I have a composite element in my hibernate mapping that I need to show up in hibernate’s classmetadata dictionary. The only way I have been able to accomplish this is to define the class in a separate <class> entry, and use <composite-element type="myClass">.
The problem with this is that the composite element does not have a key in the object, only the table. So, when I define it in a separate class, I have to give it an id, and end up making up some fake key out of the non-null elements.
Is there any way to get a composite-element to show up in the classmetadata dictionary? Or any way to define something without an id? (I know the answer to the latter is “no”, but it’s my only other thought…)
I ended up having to redesign.