Return-Path: Delivered-To: apmail-openjpa-users-archive@locus.apache.org Received: (qmail 33190 invoked from network); 7 Aug 2008 02:10:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Aug 2008 02:10:34 -0000 Received: (qmail 46000 invoked by uid 500); 7 Aug 2008 02:10:33 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 45976 invoked by uid 500); 7 Aug 2008 02:10:33 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 45965 invoked by uid 99); 7 Aug 2008 02:10:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 19:10:33 -0700 X-ASF-Spam-Status: No, hits=-2.0 required=10.0 tests=MIME_QP_LONG_LINE,RCVD_IN_DNSWL_MED,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [193.109.254.147] (HELO mail27.messagelabs.com) (193.109.254.147) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 07 Aug 2008 02:09:35 +0000 X-VirusChecked: Checked X-Env-Sender: mvorburger@odyssey-group.com X-Msg-Ref: server-8.tower-27.messagelabs.com!1218074940!222812!1 X-StarScan-Version: 5.5.12.14.2; banners=odyssey-group.com,-,- X-Originating-IP: [195.80.235.201] Received: (qmail 30370 invoked from network); 7 Aug 2008 02:09:00 -0000 Received: from unknown (HELO mail3.oams.com) (195.80.235.201) by server-8.tower-27.messagelabs.com with SMTP; 7 Aug 2008 02:09:00 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Fetch Group questions Date: Thu, 7 Aug 2008 04:08:48 +0200 Message-ID: <12D996978341E849B21C51CC97F4771DEF5F4B@mail3.oams.com> In-Reply-To: <1217463171165-661340.post@n2.nabble.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Fetch Group questions thread-index: AcjyokCbVv//a+6GTvaomD+Lw3caRwFjBjKA References: <12D996978341E849B21C51CC97F4771DE24E52@mail3.oams.com> <1217463171165-661340.post@n2.nabble.com> From: "Michael Vorburger" To: X-Virus-Checked: Checked by ClamAV on apache.org 1.=20Thanks,=20that=20works=20great. 2.=20OK;=20understand=20perfectly=20what=20your=20saying;=20thanks=20for=20= detailing.=20(Now our=20data=20architect=20WILL=20probably=20cry=20that=20"there=20are=20unn= cessary=20columns fetched!".=20=20In=20the=20"upper=20layer"=20that=20is=20creating=20the=20= FetchPlan, dynamically,=20we=20would=20actually=20have=20the=20information=20to=20kno= w=20that=20we=20will NOT=20access=20A.c=20or=20A.c,=20so=20if=20a=20future=20OpenJPA=20version=20= would=20offer=20a=20way to=20override=20this,per=20attribute=20not=20globally,=20we=20could=20leve= rage=20that;=20but it's=20certainly=20not=20critical.=20=20Do=20you=20want=20a=20JIRA=20for=20= this?) 3.=20Ignore;=20I=20think=20correctly=20configured=20Eager=20Fetching=20is=20= what=20I'm looking=20for;=20need=20to=20play=20more=20with=20this.=20I'll=20ask=20mor= e=20specific questions=20if=20needed. 4.=20Hm...=20I=20see.=20=20So=20to=20be=20safe,=20until=20this=20"bug"=20(= ?)=20gets=20addressed=20(can it?=20will=20it?=20Would=20a=20JIRA=20help?),=20or=20actually=20rather=20f= or=20the=20combination of=20Cache/FetchGroup=20to=20work=20at=20all,=20would=20it=20be=20a=20good= =20idea=20to=20may=20be split=20all=20Entities=20into=20two=20types:=20A.=20fully=20cached=20ones=20= (all=20instances with=20"ALL"=20FetchGroup=20pinned=20in=20memory)=20-=20that=20should=20wo= rk=20well=20for "lookup=20table"=20kind=20of=20Entites.=20No=20FetchGroups=20used.=20=20B.= =20No=20caching=20of all=20other=20Entites=20(most=20Business=20Entites,=20all=20with=20lot's=20= of=20columns), and=20use=20of=20FetchGroups=20-=20good=20idea?=20=20Q:=20Is=20there=20a=20= runtime=20API=20to=20the @DataCache(enabled=3Dfalse),=20some=20configuration=20API=20to=20set=20whi= ch=20classes (globally,=20given=20a=20Class,=20not=20an=20instance)=20should=20be=20cac= hed=20and=20which not? 4=201/2=20[NEW]=20Q:=20On=20a=20Query=20where=20an=20association=20to=20a=20= "fully=20cached" Entity=20IS=20in=20the=20FetchGroup,=20can=20OpenJPA=20know=20this=20and=20= NOT=20do=20the=20JOIN? (Otherwise=20I'll=20think=20about=20building=20this=20into=20a=20layer=20o= n=20top,=20although it=20would=20be=20nicer=20if=20OpenJPA=20itself=20could=20handle=20this...= ) 5.=20[NEW]=20Q:=20Is=20there=20any=20significant=20runtime=20performance=20= difference between=20putting=20the=20@FetchGroup/s=20annotation=20on=20an=20@Entity=20= and=20merely "activating"=20it=20through=20FetchPlan.addFetchGroup(String=20groupName),= =20as opposed=20to=20"building"=20it=20and=20using=20lot's=20of=20invididual FetchPlan.addField()=20?=20=20Probably=20not,=20but=20I=20thought=20I'd=20= ask. Thanks! -----Original=20Message----- From:=20Pinaki=20Poddar=20[mailto:ppoddar@apache.org]=20 Sent:=20jeudi,=2031.=20juillet=202008=2002:13 To:=20users@openjpa.apache.org Subject:=20Re:=20Fetch=20Group=20questions Hi, >=201.=20Is=20the=20"default"=20fetch=20group=20ALWAYS=20active?=20 Almost=20ALWAYS.=20Unless=20you=20really,=20seriously=20do=20not=20want=20= it,=20force removal=20by =20=20=20FetchPlan.removeFetchGroup(FetchGroup.NAME_DEFAULT); after=20clearFetchGroup(),=20it=20will=20still=20load=20the=20fields=20of=20= default=20fetch group=20after=20resetFetchGroup(),=20it=20will=20load=20the=20default=20+=20= any=20other configured=20fetch=20groups. >=202.=20Is=20there=20any=20way=20to=20configure=20OpenJPA=20to=20NOT=20ea= gerly=20fetch=20direct=20 >=20relations OpenJPA=20is=20not=20really=20'fetching'=20the=20direct=20relation=20unles= s=20it=20is included=20in=20the=20fetch=20group.=20If=20a=20row=20for=20A=20is=20read=20= from=20database=20and row(A)=20contains=20foreign=20keys=20to=20row(B)=20and=20row(C)=20(as=20th= e=20case=20may=20be for=20direct=20to-one=20mappings),=20then=20those=20FK=20values=20are=20re= ad=20and=20stored=20in a=20way=20that=20is=20invisible=20to=20user=20application.=20The=20referen= ce=20A.b=20or=20A.c=20is not=20populated. The=20intermediate=20storage=20of=20foreign=20keys=20optimizes=20any=20sub= sequent traversal=20of=20A.b=20and=20A.c=20without=20a=20join.=20 Once=20A=20has=20lots=20of=20to-one=20relations,=20it=20is=20a=20valid=20c= oncern=20that=20A=20will store=20a=20lot=20of=20FK=20values=20in=20intermediate=20storage=20(perhap= s=20without=20ever using=20them),=20but=20just=20wanted=20to=20underline=20that=20there=20is=20= no=20significant performance=20penalty=20in=20such=20cases=20as=20the=20values=20are=20read= =20from=20an existing=20row.=20 >=203.=20When=20I=20do=20FetchPlan.addField()=20for=20a=20@ManyToMany=20or= =20a=20 >=20@PersistentCollection(elementEmbedded=20=3D=20true)=20field,=20there=20= is=20no=20eager >=20fetching=20(like=20when=20the=20same=20field=20has=20FetchType.EAGER).= ..=20Should=20this work?=20Can=20somebody=20point=20to=20any=20examples=20or=20test=20cases=20= for=20this?=20Do=20we need=20to=20fiddle=20with=20the=20EagerFetchMode=20join/parallel?? Not=20sure=20I=20understand=20the=20question=20--=20can=20you=20please=20e= laborate? =20 >=20a)=20in=20other=20words,=20query=20caching=20uses=20the=20Fetch=20Grou= p=20as=20cache=20key) No.=20 >=20b)=20only=20the=20"missing"=20columns=20are=20fetched=20and=20"merged"= =20? No.=20 If=20fetch=20plan=20is=20the=20only=20thing=20that=20is=20different=20betw= een=20query=20Q1=20and Q2=20and=20QueryCache=20is=20enabled,=20=20executing=20Q1=20followed=20by=20= Q2=20will=20produce an=20incorrect=20behavior.=20OpenJPA=20will=20consider=20Q2=20as=20the=20s= ame=20as=20cached version Q1=20and=20will=20never=20apply=20fetch=20plan=20of=20Q2.=20 -- View=20this=20message=20in=20context: http://n2.nabble.com/Fetch-Group-questions-tp534861p661340.html Sent=20from=20the=20OpenJPA=20Users=20mailing=20list=20archive=20at=20Nabb= le.com. ____________________________________________________________ =95=20This=20email=20and=20any=20files=20transmitted=20with=20it=20are=20C= ONFIDENTIAL=20and=20intended =20=20solely=20for=20the=20use=20of=20the=20individual=20or=20entity=20to=20= which=20they=20are=20addressed. =95=20Any=20unauthorized=20copying,=20disclosure,=20or=20distribution=20of= =20the=20material=20within =20=20this=20email=20is=20strictly=20forbidden. =95=20Any=20views=20or=20opinions=20presented=20within=20this=20e-mail=20a= re=20solely=20those=20of=20the =20=20author=20and=20do=20not=20necessarily=20represent=20those=20of=20Ody= ssey=20Financial Technologies=20SA=20unless=20otherwise=20specifically=20stated. =95=20An=20electronic=20message=20is=20not=20binding=20on=20its=20sender.=20= Any=20message=20referring=20to =20=20a=20binding=20engagement=20must=20be=20confirmed=20in=20writing=20an= d=20duly=20signed. =95=20If=20you=20have=20received=20this=20email=20in=20error,=20please=20n= otify=20the=20sender=20immediately =20=20and=20delete=20the=20original.