Coldbox: Bleeding Edge
I followed the docs to create an active hibernate entity. My object extends coldbox.system.orm.hibernate.ActiveEntity.
According to the docs I should be able to call a save on the obj like this:
But the BaseORMService is complaining that “The ENTITY parameter to the save function is required but was not passed in”. Is this just a typo in the docs as obj.save(obj) works fine, or am I missing something? Any help is greatly appreciated.
Ok will take a look at it. That should work. Might be a bug
Would be cool if active entity supported the populate functions too.
Wow - I completely missed the new ActiveEntity stuff when 3.5 was announced, only just been reading about it, awesome!!
I have been dreaming about an implementation like this for a long-long while, really excited.
@Luis - Do we have any current plans in the road map to add richer relationship collections to an entity, to make searching for related / child objects easier?
For instance, if I have ‘Foo’ that has many ‘Bars’ - could I get an instance of Foo, and then do Foo.bars.find(name=‘Luis’); to search through Foos related Bars to find one with certain properties?
This is something I find a common use-case, and at the moment use HQL or Criteria queries to do the work.
Well, this is just a start and it is definitely working out great. So all ideas welcome. The criteria query builder is fantastic so maybe we can abstract it further for active entity.
Luis F. Majano
Ortus Solutions, Corp
ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
IECFUG Manager: http://www.iecfug.com
Social: twitter.com/lmajano facebook.com/lmajano
i couldnt find any docs on active entity. are there?