Inserting into two table simultaneously using hibernate save -
i have dto reference table table_1 , have has element collection table_2 using
@collectiontable(name="_", joincolumns=@joincolumn(name="___"))
i defined way because when updating table_1 want update table_2 too.
i defined procedures , correctly.
can me in regard, thankful.
the usual way use @onetomany
(as described in documentation).
if add elements collection, hibernate automatically persist these if save table_1
Comments
Post a Comment