Wirebox & VirtualEntityService

I keep going over the documentation http://wiki.coldbox.org/wiki/WireBox.cfm
but I just don't see it.

If I'm using a VirtualEntityService say like..

component extends="coldbox.system.orm.hibernate.VirtualEntityService"
singleton {
  public UserService function init(){
    return this;

I don't see how wirebox can come into play? I'd like the User object
be created by wirebox so inside of User, it can be injected with other
component name="User" {
  property name="whateverobj" inject="coldbox:whatever";

Just to expand, this is in my config:

In my handlers, is this:
property name="userService" inject="model:userService";

in my events, is this:
User = userService.get(UserID);

in my User obj, is this (just for testing to see if it actually gets
property name="userService" inject="model:userService";

but, when I dump the User object, userService is '[empty string]'

So, I'm really confused. Its wired in the binder, the handler &
events get the service, create the User object (right?) but, the User
object doesnt get injected with anything.

I am assuming that User is a persistent CFC, so there are a few other things you need to do to make this work.

1) Turn on eventhandling for you application.

<cfset this.ormsettings = {



} />

2) Turn on property injection in your autowire interceptor,



properties={entityInjection = true}


3) Create that model.ORMEventHandler cfc we set above and have it extend coldbox.system.orm.hibernate.EventHandler

component extends="coldbox.system.orm.hibernate.EventHandler"{


That should do it for you.


Curt Gratz
Computer Know How

No luck...
I had everything like you said, except
properties={entityInjection=true}, so.. I turned that one, no luck

I wasn't quite sure where or how that should be declared, so in
Config.cfc, Wirebox.cfc and in my ModuleConfig.cfc in the module im
trying to create, each one had both of these:
listeners =
= true}}];
interceptors =

and still no luck =/

ah! hah! Thanks Curt, that actually did work, I misspelled the
injector property.. but, Just to make sure, which one of those is
correct listeners/interceptors and, it can just be in the moduleconfig

The interceptor in the Coldbox.cfc...