-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Polymorphic association(any mapping) with EJB3.0 annotations
PostPosted: Wed Oct 11, 2006 4:19 am 
Beginner
Beginner

Joined: Fri Oct 06, 2006 2:49 am
Posts: 25
Hi all,

I would like to know how to model an any mapping for a polymorphic association this with the EJB 3.0 annotations:

<any name="payment" meta-type="string" id-type="long">
<meta-value value="CREDIT" class="CreditCardPayment"/>
<meta-value value="CASH" class="CashPayment"/>
<meta-value value="CHEQUE" class="ChequePayment"/>
<column name="PAYMENT_CLASS"/>
<column name="PAYMENT_ID"/>
</any>


thanks in advance,
tiggy


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 11, 2006 11:07 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
you can't, but patches are welcome :-)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 26, 2006 5:52 am 
Newbie

Joined: Thu Oct 26, 2006 5:44 am
Posts: 4
emmanuel wrote:
you can't, but patches are welcome :-)


Hi Emmanuel,

can the Hibernate native <any> mapping be used together with JPA annotations? Thanks.

Luo


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 26, 2006 6:43 am 
Beginner
Beginner

Joined: Fri Oct 06, 2006 2:49 am
Posts: 25
No way (as explained above) you have to write hbm file(s), there is no problem to mix annotations and hbm for separate classes.

tiggy


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 26, 2006 7:34 am 
Newbie

Joined: Thu Oct 26, 2006 5:44 am
Posts: 4
Thanks tiggy.

Luo


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.