|
The XDoclet documentation still does not contain this parameter.
Should this then be a defect against the documentation? Reopening as a documentation bug.
Correct me if I'm wrong, but doesn't @hibernate.id class="my.composite.key.Class" correspond to "Components as Composite Identifiers" (url: http://www.hibernate.org/hib_docs/reference/en/html/components.html#components-compositeid) instead of composite-id (url: http://www.hibernate.org/hib_docs/reference/en/html/mapping.html#mapping-declaration-compositeid)?
I'm trying to create a composite-id, made up of multiple properties found within my class. I don't want to create a "component composite ID". Is this possible with XDoclet? How does one tag those multiple properties as IDs? Thanks, Gili In fact, using @hibernate.id class="blah" doesn't work at all on my end. I am using XDoclet 1.2.1.
Please upgrade the priority of this issue and make sure it is possible to create <composite-id> tags properly. Perhaps I misunderstood the @hibernate.id syntax so please include a more thorough example of the usage in your reply. It doesn't work for either, nothing is generated inside the <composite-id> tag. I since moved to writing the Hibernate descriptors manually.
I just tried it with CVS head and the /samples project. It properly created for the CompositeEntry the key:
<composite-id name="id" class="test.hibernate.CompositeId" > <key-property name="foo" type="java.lang.Integer" column="foo" /> <key-property name="bar" type="long" column="bar" /> <key-property name="baz" type="java.lang.String" column="baz" /> <key-many-to-one name="order" class="test.hibernate.Order" column="order" /> </composite-id> I think we can close this bug... Eric,
can you comment if HEAD==Xdoclet 1.2.2? Funny you mention this.. I posted this, was going to mark it resolved, and saw that 1.2.2 was listed as a released version.. It was CVS head as of an hour ago.
Have we released 1.2.2? I see the docs updated, and on SF the files, but no email announcment! It is not yet officially announced, as sf.net has problems with their download mirrors.
You might check the tags on the file(s). If the head revision also has xdoclet-v-1.2.2 as tag, then the fix is in 1.2.2. Look at CompositeId and CompositeIdEntry:
http://cvs.sourceforge.net/viewcvs.py/xdoclet/xdoclet/samples/src/java/test/hibernate/?only_with_tag=HEAD However, now I am secondguessing myself, that this isn't what you want? The best way to fix this is can you edit the /samples and add a Java class with the tag? And what you expect in the HBM? And I can tackle fixing it. Eric,
All I want to be able to do is specify a composite-id made up of multiple properties of a table. I don't want to have to specify a separate class to act as the composite entity. Ideally I should be able to use multiple @hibernate.id tags, XDoclet will merge them all, and if there are more than one @hibernate.id tags then they turn into composite-ids. This should work nicely now (and is documented).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
As far as I can ascertain, the support has existed since 1.2 beta 3.