spring data jpa - JPA: do i have to fetch all OneToMany relation list in order to add new relation -


lets have entity , has list of b mark onetomany. have fetch of b items in order add new b item list has?

example:

@entity public class {     @id    long id;     @onetomany    list<b> bs; }  

do have fetch of a.bs in order add new item bs ?

thanks

alon

edit few more questions:

@german: interesting! few questions

  1. what if join between , b table c? same behavior?

  2. why list make troubles?

  3. what can use instead of list? set?

  4. if persist overwrite links b?

  5. what if link manytomany (using table)

you have add b a's bs list. happens though provider specific. providers eclipselink can avoid fetching list operations on lazy loaded lists when change tracking enabled


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -