RE: [coldbox:15667] mapDSL("entityService") - trying to get funky

Yes, that’s essentially what I had suggested in my first message, except you’d be wiring in an ID in one instance and DSL in another instance. In theory it will work, as long as you don’t need to pass an entity name in when using the mapping ID.

Honestly though-- I don’t think you’re getting a ton of benifit out of a custom builder if your DSL uses only a single stage. At that point, you just have a glorified mapping ID.

Example of single-stage DSL

Example of multi-stage DSL (where builders really come in handy)



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

Yeah, I’m definitely always going to be using multi-stage. I came up with a workaround though, a bit kludgey but it’s fine. I’m using a custom namespace for all injections “myEntityService” and in ORM apps I map this to a new builder whose process() function just replicates Builder.getEntityServiceDSL(), and in Mongo apps I map it to my custom builder.