Sanjay,
If you want only one query to accomplish this, I doubt this is possible with
JPA. You might expreriment with eager collection loading or fetch groups but I
expect it to issue multiple SQL queries.
Regards,
Milosz
> Thanks for reply Milosz,
>
> how my query will be so it will return 25
Thanks for reply Milosz,
how my query will be so it will return 25 records from TABLE_A with
collection_of_b populated in each record.
-sanjay
-Original Message-
From: Miłosz Tylenda [mailto:mtyle...@o2.pl]
Sent: Thursday, July 30, 2009 11:02 AM
To: users@openjpa.apache.org
Subject: Re
> If you join table A with table B and return only A columns,
> you will get as many A rows as there are rows in B.
I was too fast, correction:
If you join table A with table B and return only A columns,
you will get as many rows as there are (A,B) tuples produced by the join and
some rows mig
Hi Sanjay,
> my query is like this.
>
> String queryString = "SELECT a FROM Table_A a LEFT JOIN FETCH
> a.collection_of_b WHERE my_condition
> Query q = em.createQuery(queryString);
> q.setFirstResult(0);
> q.setMaxResults(25);
> q.getResultList()
>
> above query does
Hi, All
my query is like this.
String queryString = "SELECT a FROM Table_A a LEFT JOIN FETCH
a.collection_of_b WHERE my_condition
Query q = em.createQuery(queryString);
q.setFirstResult(0);
q.setMaxResults(25);
q.getResultList()
above query does not return 25 rec
Hi,
Which version of the MySQL JDBC driver are you using?
OpenJPA creates callable statements when you use em.createNativeQuery(). On
many versions of the MySQL driver (anything < 5.1.6 in my experience) the
callable statement would only work if you were calling a stored procedure.
After upg
Sorry to continue to compare with EclipseLink but the application is working
just fine on TopLink/EclipseLink and I am trying to get it to work with
OpenJPA. The
http://n2.nabble.com/enhancing-entity-which-is-a-subclass-tp612p612.html
first problem was resolved by Rick (thanks!) and afte
Hi the list !
After long investigation, my previous problem come from a proxy.
I have a collection of B in A. Using fetch plan, I removed B and get
back my A without B witch is good.
Somewhere, I have the following code :
This happen after the transaction is closed, I explicitly close the
e