Article View: pl.comp.lang.java
Article #141648Re: Java Persistence - pytanka
From: Newion
Date: Thu, 16 Oct 2008 11:10
Date: Thu, 16 Oct 2008 11:10
23 lines
1997 bytes
1997 bytes
Dariusz Marcinek napisał(a):
> Pytania:
> a) dlaczego przy conajmniej dwoch listach i fetch ustawionym na
> EAGER
> wyrzucany jest wyjatek "cannot simultaneously fetch multiple bags"
> ??
"although Hibernate lets you create Cartesian products with
fetch="join" on two (or even more) parallel collections, it throws an exception
if you try to enable fetch="join" on parallel <bag> collections. The resultset
of a product cant be converted into bag collections, because Hibernate
cant know which rows contain duplicates that are valid (bags allow duplicates)
and which arent. If you use bag collections (they are the default @OneToMany
collection in Java Persistence), dont enable a fetching strategy that results in
products. Use subselects or immediate secondary-select fetching for parallel
eager fetching of bag collections."
Java Persistence with Hibernate (2006), Christian Bauer, Gavin King
Pozdrawiam
Pawel
Technical Details
Message-ID:
<Xns9B3986008E989ek029968@213.180.128.149>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!news.onet.pl!not-for-mailReferences:
<gd5da8$esh$1@inews.gazeta.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!news.onet.pl!not-for-mail From: Newion <newion@o2.pl.invalid> Newsgroups: pl.comp.lang.java Subject: Re: Java Persistence - pytanka Date: Thu, 16 Oct 2008 13:10:22 +0200 Organization: Onet.pl Lines: 23 Message-ID: <Xns9B3986008E989ek029968@213.180.128.149> References: <gd5da8$esh$1@inews.gazeta.pl> Reply-To: newion@o2.pl.invalid NNTP-Posting-Host: 109-130.echostar.pl Mime-Version: 1.0 X-Trace: news.onet.pl 1224155419 21718 213.156.109.130 (16 Oct 2008 11:10:19 GMT) X-Complaints-To: usenet@news.onet.pl NNTP-Posting-Date: Thu, 16 Oct 2008 11:10:19 +0000 (UTC) X-Sender: Q8NEzG+VPCULPf8YBpqIyhQr6HcXVqOI X-Face: #JJ4HGj/XZ::dRSX-ltR)-9<D3X3qlwrbaJGpIhc<\~Cti2?!oXciZ1f*uGSx~Dk2`QbQ-OeDG9YXqkdC(e8kDm+bftsGDoK)N`@O24AQcqLx<E(^bs<P;")Js')4a4cJ"rAl:D7xRyLEf2}`-p@#y0'gpy~#3LhWT9hk&ME>?tcA]@:rcd3I6sFwvd(oM/PQ>6~XLb3 User-Agent: Xnews/2005.10.18 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit