Session#Update vs Session#Merge the time of migration

Does it cause a problem to use the migration time Session#update instead of Session#merge because we will have objects loaded from our old proprietary ORM system and from Hibernate, given that Session#merge is deprecated?

Because Session#merge loads an object from the database and then populates it with annotations that I don’t have in the hybrid case, whereas I can manage with Session#update.

Also, is it better to ask this kind of question here or on Zulip?

Thank you!

Where did you see that Session#merge is deprecated? I guess you meant to say Session#update is deprecated.

Just do the migration. If you have a problem with it, then you can report that.

Yes, sorry, Session#update is deprecated.
But what I meant to say was that I actually wanted to use Session#update.
And once all our objects are migrated to Hibernate, then I will use Session#merge.
And I wanted to know if this could cause any issues?

If you want to use Session#update for your migration then do so. We won’t remove this until Hibernate 7. But as far as I know, merge should do the same as update.

1 Like