Having two tables
A
- id
- name
- bId
B
- id
- name
In the entity classes, because A is sent over a Webservice (in large amounts), I don’t want to have B as a member of A. So the A-class does only have a member like that:
@Column(nullable=false)
private long bId;
Considering that, how can I retrieve a list with all A’s referring to a B with name = X most effectively in JPQL?
Note that A could have a toOne relationship to B marked as lazy, and configured (with transient?) so that it’s not serialized by your Java to XML process.