Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.databases > #661

Re: JPA: annotations or XML?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Stanimir Stamenkov <s7an10@netscape.net>
Newsgroups comp.lang.java.databases
Subject Re: JPA: annotations or XML?
Date Thu, 02 Jan 2014 11:31:58 +0200
Organization A noiseless patient Spider
Lines 31
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>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Thu, 2 Jan 2014 09:31:48 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="63f4af6fea673ddbb3ff8ab2075cec54"; logging-data="29330"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18snCsjaRWI1d0mDS+wXkBU"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
In-Reply-To <52be46d0$0$299$14726298@news.sunsite.dk>
X-Face "@)%Vlap6d%OVYDS}B4YUWE@yUy+^!w/+.q.,c5kjI#+uG?kYP&r/pTjNWgo:g[A,O=AL3/ j&4Le2cau$<e=FPq~GbeZ6DW1Grey[VHn8?ktzvoQtzlg;]&rh8g]CD+_BC7d[gW{Yx&_X*4Q$h&nJ l@t(|4R4:T='&]U#ui+z9OC$.~gJjU93kh:Ojc$Cz0n#I9!~!9ay?E<UlW&5,IFX1*KtA>MYEFst$y y"m]M7tq\S(>[a$x0x8%S
Cancel-Lock sha1:GAk4hD6Fo/wHZ1yuB+30GmgL3cg=
Xref csiph.com comp.lang.java.databases:661

Show key headers only | View raw


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 | NextPrevious in thread | Find similar


Thread

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