Well that is somewhat good news (i.e. there seems to
be an easy workaround) but ultimately a bug in our code somewhere,
so please enter a bug with this information.
Thanks,
Guy
On 06/02/2013 4:05 PM, exabrial wrote:
I retract my previous statement.... I accidentally switched back to 2.4.1.
Switching to 2.5.0-M6, your suggestion works with createNamedQuery() and
createQuery()!
So, the following results in an exception:
@Override
public List<Item> listActiveItems() {
em.setProperty("customer_schema", "cust_tables");
// em.find(Item.class, 1L);
log.debug("listActiveItems()");
TypedQuery<Item> query = em.createNamedQuery("listActiveItems",
Item.class);
List<Item> results = query.getResultList();
log.debug("listActiveItems() found {} items", results.size());
return results;
}
The following works:
@Override
public List<Item> listActiveItems() {
em.setProperty("customer_schema", "cust_tables");
em.find(Item.class, 1L);
log.debug("listActiveItems()");
TypedQuery<Item> query = em.createNamedQuery("listActiveItems",
Item.class);
List<Item> results = query.getResultList();
log.debug("listActiveItems() found {} items", results.size());
return results;
}
--
View this message in context: http://eclipse.1072660.n5.nabble.com/TENANT-PER-TABLE-Problem-Can-t-compile-Named-Query-tp157573p157603.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
--

Guy Pelletier
ORACLE Canada,
45 O'Connor Street
Suite 400
Ottawa, Ontario
Canada K1P 1A4
Oracle is committed to developing
practices and products that help protect the environment
|