jQuery in Action, 3rd 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 Building Microservices this week in the Design 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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32507
    
214

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.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: getting information from cascade
 
It's not a secret anymore!