File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
Conditions for dependent entites on fetching?
Joined: Oct 16, 2008
Nov 11, 2008 11:34:00
I am trying to execute a JPQL query using toplink, where an entity fetches its dependent entities, but would like to filter those entities based on status. Situation is as follows:
Customer class has a set of numbers
Number class has a status which can be 0, or 1
to select a customer with a certain id:
SELECT c FROM Customer c left join fetch c.numbers n WHERE n.status = 0 AND c.id = ?id
gives a toplink exception, "unexpected token: n"
I agree. Here's the link:
subject: Conditions for dependent entites on fetching?
HTTP Status 403 - Access to the requested resource has been denied
Spring/JPA/TopLink 11g extensions
Problems using GenerationType.IDENTITY for in-memory databases
Java Persistence API
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014