Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.databases > #661
| From | Stanimir Stamenkov <s7an10@netscape.net> |
|---|---|
| Newsgroups | comp.lang.java.databases |
| Subject | Re: JPA: annotations or XML? |
| Date | 2014-01-02 11:31 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <la3bm4$ski$1@dont-email.me> (permalink) |
| References | <l8nov9$sq4$1@speranza.aioe.org> <52ba5ad5$0$296$14726298@news.sunsite.dk> <l9ef31$nj4$1@dont-email.me> <52be46d0$0$299$14726298@news.sunsite.dk> |
Fri, 27 Dec 2013 22:34:36 -0500, /Arne Vajhøj/:
> On 12/25/2013 6:21 AM, Stanimir Stamenkov wrote:
>
>> @Entity
>> @AttributeOverrides({
>> @AttributeOverride(name="foo", column=@Column("FUN")),
>> ...
>> })
>> @AssociationOverrides({
>> @AssociationOverride(name="bar",
>> joinColumns=@JoinColumn("BAR_ID")),
>> ...
>> })
>> public class MyDatabaseEntity extends MyBean {
>>
>> // Nothing in here.
>>
>> }
>>
>> Haven't tried it, though.
>
> I guess the question is whether it will work without
> @MappedSuperclass on the base class.
Yes. I think @MappedSuperclass is only necessary for the framework
to pick any explicit mappings (JPA annotations) defined on the super
class, but still – needs to be tested with the JPA implementation in
use.
--
Stanimir
Back to comp.lang.java.databases | Previous | Next — Previous in thread | Find similar
JPA: annotations or XML? Ricardo Palomaes <rpmdisguise-java@nowhere.com> - 2013-12-16 21:48 +0100
Re: JPA: annotations or XML? Arne Vajhøj <arne@vajhoej.dk> - 2013-12-24 23:11 -0500
Re: JPA: annotations or XML? Stanimir Stamenkov <s7an10@netscape.net> - 2013-12-25 13:21 +0200
Re: JPA: annotations or XML? Arne Vajhøj <arne@vajhoej.dk> - 2013-12-27 22:34 -0500
Re: JPA: annotations or XML? Stanimir Stamenkov <s7an10@netscape.net> - 2014-01-02 11:31 +0200
csiph-web