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??
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.