I have a two table A and B:
A columns (ID,NameA,BiD)
B columns (ID,NameB)
ID is referenced to Bid as foreign RelationMapping.
Here is the problem .My Hibenate B Entity has not got List but My hibernate A entity has got B entity instance.
select a.* from A a, B b
where a.BiD=b.ID
How can ı do this query in Hibernate Criteria Api?
I hope I can explain my problem?
You don’t need to join the classes in the query. This information is in the mapping file. If you load A’s, the B’s are loaded (probably lazily) too.
If this answer doesn’t help, you forgot to provide some information about the query you need.