adamgibbons wrote:
beep_beep wrote:
is it really possible to create tree of CompositeUserObjects(that one is parent for other...), and then save entire tree in single table?
I somehow doubt it. Ask Max.
Hibernate isn't the magic bullet solution people seem to think it is. Sure you can do plenty with it, and it's fairly flexible, but it won't do every crazy thing you can posibly think of.
Why would you want to save an entire tree in one table? That's not very OO or Normalised. If you go against core princibels like that then you're not going to get on very well with Hibernate.
It is not against core principals.
I have requirement to "flatten" all data from 2 objects: A and B in single table, when A "has" B.
Note: there is no requirement to flatten A that "has" COLLECTION of Bs.
So no principals violation.
And I supposed to gain this possibility from Hibernate almost free of charge, because it is looks like CompositeUserType is built for that, but unfortunatelly it able to work only down to simple types in CompositeUserType , not to attribute, that is CompositeUserType itself.
It would be nice to have that feature, but It seems we have not this one.
Thanks for answering, but it seems to me you did not understand completelly my question.
Thanks.