Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #32137
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Peter <mcheung63@hotmail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | hibernate question (weird problem) |
| Date | Sat, 25 Jul 2015 17:10:06 +0800 |
| Organization | Aioe.org NNTP Server |
| Lines | 24 |
| Message-ID | <movjpe$tvk$1@speranza.aioe.org> (permalink) |
| NNTP-Posting-Host | ERBPD1AC/UiO3V/0wSovzg.user.speranza.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | csiph.com comp.lang.java.programmer:32137 |
Show key headers only | View raw
Hi
I am using hibernate, i got two class "JMPDATA" and "PARAMETER",
they are linked together. Then I execute :
session.createSQLQuery("SELECT a.* from JMPDATA").addEntity(JmpData.class);
I didn't join table parameter, but i still able to get the value of it, why?
iterator = query.list().iterator();
while (iterator.hasNext()) {
JmpData d = iterator.next();
for (Parameter p : d.parameters) {
System.out.println("\t" + p.name);
}
}
I am using H2 database, and i enable the trace log, i saw the h2 is
receive this sql command from hibernate. I am sure it didn't left join
the parameter table.
SELECT a.* from JMPDATA as a limit ?
thanks
from Peter (cmk128@hotmail.com)
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
hibernate question (weird problem) Peter <mcheung63@hotmail.com> - 2015-07-25 17:10 +0800
Re: hibernate question (weird problem) Arne Vajhøj <arne@vajhoej.dk> - 2015-07-25 15:22 -0400
Re: hibernate question (weird problem) mcheung63@gmail.com - 2015-07-25 23:25 -0700
csiph-web