jQuery in Action, 2nd edition*
The moose likes EJB and other Java EE Technologies and the fly likes getting information from cascade Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "getting information from cascade" Watch "getting information from cascade" New topic
Author

getting information from cascade

addrian brilianda
Greenhorn

Joined: May 07, 2012
Posts: 6
I have 2 tables.. one table provide the province describe with province ID for the PK..another table have city describe where it have the coloumns of province ID.. and then i want to call the city with the specified province ID... ex call the city where province ID is 1..... how to make the queries of it with JPA and EJB??
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

Everything you need is in one table making it easy. You need a named query for your City entity with the province id in the where clause. Search for named queries for some examples and then post back here if you have more questions/get stuck.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
 
subject: getting information from cascade
 
Similar Threads
Where are U from?
preparedStatement
OneToMany not by ID
JQuery table manipulation
Please suggest