I was wondering how can I cascade a pessimistic lock across all child entities in a onetomany where the child entities reside in other tables and it is unidirectional?
I'm operating within a JEE5 environment so would like to make use of standard JPA EM calls if possible so at the moment I'm doing something like this.
Code:
em.lock(
em.getReference( x.class, x.getID() ),
LockModeType.WRITE );
Now assuming x has two unidirectional @OneToMany linked by a jointable does doing this cascade a pessimistic lock across all of the childen?
Thanks, S.D.