Copying Tenant Data [message #1739595] |
Wed, 03 August 2016 07:57 |
Ryan Bennetts Messages: 1 Registered: September 2014 |
Junior Member |
|
|
Hello
I'm using @Multitenant and @TenantDiscriminatorColumn to achieve multi-tenancy in my application.
I would like to be able to create a new tenant from an existing one by copying all data. Does Eclipselink have a facility for this?
I've looked around and it seems that most recommendations are to either
1) load the entire object graph, reset the ids of every entity, and then persist them. I suppose I could try this by changing the tenant property in between loading and persisting.
or
2) create a deep copy (via clone() or serialization) and then persist the copied objects.
Is there nothing in Eclipselink which can handle this for me? Has anyone done something similar?
Cheers.
|
|
|
Powered by
FUDForum. Page generated in 0.02879 seconds