The issue is that Hibernate tends to encourage the creation of extremely complex and interrelated object graphs. As a practical matter that means that trying to dump subsets of the data manually via JDBC is very awkward because you have to determine all the relationships yourself e.g.
Ok, I want to move this user record. Hence I need his role records. And I need the related rows in the roll table. And I need the rows in the address table. And I need to get his preferences for each grid in the system. But wait, that's not all, the role records reference the organization record. Have to get that too. But wait, the organization record reference the organization manager, have to get his user record too. Ok, so, now we're recursing ... :) I mean you *can* do it for any given specific case but it's a lot of error-prone work. Hibernate can do it automatically for you with POJOs, but its xml support isn't ready for production use. Trying to find a solution that leverages the Hibernate metadata (which already understands the interconnectedness of my object graph) seems like a much less error prone approach than reconstructing a copy of that meta-data inside another tool and then trying to keep them both in synch. --- Pat > -----Original Message----- > From: Konstantin Ignatyev [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 06, 2005 12:46 PM > To: Tapestry users > Subject: RE: [very OT] tools for migrating database > > Perhaps: > http://octopus.objectweb.org/ > > > Patrick Casey <[EMAIL PROTECTED]> wrote: > Currently, I'm doing database dumps from my dev instance and loading > them into my test box (via the mysql dump utility). This is problematic > though as it's destructive vis-à-vis the test instance. > > I thought at one point I'd be able to use Hibernate's XML export > tools to dump relevant data out of one instance and into another, but the > Hibernate XML tools are *not* ready for prime time. They don't handle > recursive graphs well, then dump core on some types of data (lists of > scalars for example), etc. Worse, the JIRA items I opened on the subject > aren't scheduled for fix until 3.2 :(. > > I toyed with the idea of writing my own load/unload code but haven't > bit off that particular bullet yet. It's not complicated, it's just ... > tedious and there's always something more important to work on in my > experience. > > So if you find a good solution, I'd love to hear it, but in the > interim, rest assured, you're not alone on this issue. > > --- Pat > > > -----Original Message----- > > From: Dan Adams [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, December 06, 2005 12:12 PM > > To: Tapestry users > > Subject: [very OT] tools for migrating database > > > > I have a testing server which runs locally and then a staging server > > which actually gets tested on by other people and is updated after each > > iteration. I use hibernate. Does anyone know of a way to update the > > staging server database to sync up the schema with the test database > > (the current schema) without blowing away the data? I currently use > > mysql on both servers but am planning on moving the test server to > > hsqldb at some point it can't be a server specific tool. Any ideas? > > > > -- > > Dan Adams > > Software Engineer > > Interactive Factory > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > Konstantin Ignatyev > > > > > PS: If this is a typical day on planet earth, humans will add fifteen > million tons of carbon to the atmosphere, destroy 115 square miles of > tropical rainforest, create seventy-two miles of desert, eliminate between > forty to one hundred species, erode seventy-one million tons of topsoil, > add 2,700 tons of CFCs to the stratosphere, and increase their population > by 263,000 > > Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs > a Strategy for Reforming Universities and Public Schools. New York: > State University of New York Press, 1997: (4) (5) (p.206) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]