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:
obj.save()
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.
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.