ORM Issue within Module

In a module, I have:

property name=“userService” inject=“entityService:User”;

which works fine within the core application.

However, when trying: userService.getAll(); I get:

Message Error while loading the entity.
Detail org.hibernate.HibernateException: collection is not associated with any session

I just can’t figure out why… any pointers?


Okay, NOT an issue with the module.

The getAll() is what is failing.

In the same handler, using the same auto wired service, I can do:

var user = userService.get(userID);

and user is valid

if I do:

var user = userService.getAll();


var user = userService.list(aqQuery=‘false’);

I receive the hibernate exception.

I’m very perplexed.

help please!

Hmm, what does the entity look like

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

If you just inject the BaseOrmService and use that, does it still

property name="BaseORMService" inject="model";

users = BaseORMService.list(entityName="user");

I ended up figuring out that it was caused by an out of memory problem (or so I think). The entities being loaded have a lot of relationships, when I limited the number of results it worked fine, when getting all results I received the error.

The issue ended up NOT being just in the module, but persisted across the entire application when accessing the entirety of the record sets.

I ended up working around the issue by just doing a query and forgoing the ORM. How might I have avoided this?


Hmm I am still in the dark on this Ben. Unless you don’t us lazy relationships

Luis Majano
Ortus Solutions, Corp
Toll free phone/fax: 1-888-557-8057
Mobile: 909-248-3408