My current project uses JPA and HSQLDB.
I would like to persist multiple related objcts at one go, is that by any means possible in JPA?
Ex: Suppose there are two entities like Person and ContactInfo, where Person has List<ContactInfo> entities.
If I want to persist Person entity along with ContactInfos also, what I am doing is set the list in Person and call persist. Will doing that take care of persisting List<ContactInfo> also? (With foreign key reference to Person ID in database table)
Else kindly let mek now how would I achieve this in JPA.
Regards,
Satya
It will, if you set
@*ToMany(cascade=CascadeType.PERSIST)