[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-9) Support interface inheritance mapping
Matt Davis (JIRA)
noreply at atlassian.com
Sun Dec 28 12:27:40 EST 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-9?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32026#action_32026 ]
Matt Davis commented on ANN-9:
------------------------------
I just wanted to remind you how hopeful and optimistic you were about this feature in your book :) I assumed this would be in by now because it's been a while, but I'm glad I found this to let me know to stop trying with annotations. Anyway, here's a reminder of your youthful enthusiasm for this feature. I like the exclamation point after interface, implying how silly it was of the JPA spec people to not have this feature yet :)
Page 210 of Java Persistence with Hibernate by Christian Bauer and Gavin King:
"Note that the JPA specification doesn't support any mapping annotation on an interface! This will be resolved in a future version of the specification; when you read this book, it will probably be possible with Hibernate Annotations."
I'm sure my app will be fine without it. But it would've been nice!
> Support interface inheritance mapping
> -------------------------------------
>
> Key: ANN-9
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-9
> Project: Hibernate Annotations
> Issue Type: Improvement
> Components: binder
> Affects Versions: 3.1beta3
> Reporter: Gili
> Attachments: hibernate3-annotations-3.1beta5-3896-3948.diff, hibernate3-annotations-3.1beta5-3896-4138.diff
>
>
> It should be possible to create a mapping with interfaces, as described by the documentation here: http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#inheritance-tableperclass
> Specifically right now it is impossible to annotate interfaces and according to HBX-231 even if you could @Entity is only meant to get used on classes so the question becomes "what do you annotate it with?"
> As I pointed out here http://forum.hibernate.org/viewtopic.php?p=2238824#2238824 the additional problem seems to be that XDoclet doesn't support interface annotation either (http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1345) so I'm left without a workaround.
> I can't convert the interfaces to abstract classes because I implement multiple interfaces in my application and Java does not do multiple inheritance.
> If you know of a nice workaround, please let me know :)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list