Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] How to compare entities from two different databases and replace one with the other?

You can use dbunit to compare data in tables.   Ant tasks are simple,
but you can do it programmically as well.

http://www.dbunit.org/anttask.html#databasecompare

http://www.dbunit.org/anttask.html#partialcompare

You can also use dbunit to export data from one database and import it
into another database, again, either using ant or java code.

On Wed, Mar 31, 2010 at 8:11 AM, Samba <saasira@xxxxxxxxx> wrote:
> Hi all,
>
>     I need to compare data in two databases, one a test db and the other
> being reference db, and then patch the differences in the database that is
> being compared from the
>     data in the reference db.
>
>     Can eclipselink detect changes between two entities, each loaded by
> a different entity manager?
>
>     Can I use the eclipselink change tracking api ( merge the comparable
> entity with reference entity manager and then invoke
> UnitOfWork.getUnitOfWorkChangeSet() or
>     UnitOfWork.getCurrentChanges() ) for finding the differences between the
> test entity and the reference enitity?
>
>
>    I'm open to any other approach that can help me achieve this; even
> hibernate or openjpa is also ok to me!
>
> Thanks and Regards,
> Samba
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>


Back to the top