i have a simple database one-directionnel-relationthip :
public class Bill{
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn( name="BILL_ACTOR" )
private fr.teamwill.cbm.model.actor.Actor actor;
}
i need to get the email of the actor, but when i do this i get an exception about lazy:
bill.getActor().getEmail() ---> exception
PLease can you give me sql requete to get the actor , i am a bit weak in database , here is wat i think of:
select a.email From Bill b , Actor a fetch join ?????? or inner join??
Please give me the requete and thank you alot