Reputation: 669
I have two tables, the first has the columns table1:
Id
name
description
status
url
The second has the columns: table2:
Id
status
url
Is it possible to use the Hibernate Replicate method to do: selection all from table1 -> insert only some columns in table2?
Upvotes: 0
Views: 1085
Reputation: 3669
Replicate
is to persist the data objects in a different data store without regenerating the identities.
Basically you detach the object from one data store and attach it to another data store.
While doing so your Entity
object is same, so basically you need same structure.
If you want to avoid that then you need to create separate entities for each tables and copy the data between them using getter/setters.
For more information on Hibernate Replicate.
Upvotes: 1