ORM Entity Service Question

If I want to use an ORM service, are these my only two options?

  1. using generic ORM service and manually specifying entity type each time

  2. implementing a custom virtual entity service

Or, is there a way to specify the entity type when auto wiring?

-Ben

You can autowire it with

Curt

You can autowire it with

Curt

Yep, you got it.

Curt

In your Wirebox config you could also specify it like this:

map("ServiceName")
  .toDSL("entityService:EntityName")
  .asSingleton();

Then wherever you need to use it just do:

<cfproperty name="ServiceName" inject="model">

The benefit of doing it like this is that if you one day move to a
concrete service, you just change it in your Wirebox config instead of
changing it in every object that depends on it.