Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.2.26.GA
Hello,
I'm hoping Hibernate will be able to facilitate the following scenario.
I've extract a set of related properties into a component (@Embeddable) class.
Now I'd like to add a method on my component class that performs a computation. The parameters for the computation are mostly from the component class, but I also need one or two properties from the 'owning entity' - the class which contains my component.
The basic rationale is for
a) rich, 'domain driven' objects and
b) perform the computation nearby to where all the relevant data is.
Of course I could remap the attributes that I need with insert="false" update="false", but that leaves me with:
* Duplicate in both the code and the mapping file.
* Having to update the component class when the owning object changes.
Thanks,
Jasper