You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Michael Bergens (JIRA)" <de...@cayenne.apache.org> on 2008/01/20 23:55:33 UTC
[JIRA] Created: (CAY-968) Portable Data with Cayenne - database
load/unload feature
Portable Data with Cayenne - database load/unload feature
---------------------------------------------------------
Key: CAY-968
URL: https://issues.apache.org/cayenne/browse/CAY-968
Project: Cayenne
Issue Type: New Feature
Components: Cayenne Core Library
Affects Versions: UNDEFINED FUTURE
Reporter: Michael Bergens
Assignee: Andrus Adamchik
Priority: Minor
Here's a dream: I run an ant target or a set of API calls with proper configuration against a database configured with Cayenne, it gives me a set of files or just one file, possibly some compressed archive format such as zip which contain all I need to recreate the same data under the same DBMS or a different one. So whenever needed, I can send this file or files to a colleague who would run a reverse ant target (or a set of API calls) and have the same database ready for use in the DBMS of his choice.
Cayenne has plenty of good stuff which would make this possible and my team is currently implementing subset of this functionality tailored to our specifics: it requires some manual effort on the part of indicating the sequence in which the tables should be loaded, manual adjustment of primary key generation info after loading a table etc. Would be good to have this implemented in a core or an optional extension. The portable format should be versionable plain text such as XML or JSON - that would allow me to to use the VCS to keep my test data, demo data etc, properly versioned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [JIRA] Created: (CAY-968) Portable Data with Cayenne - database
load/unload feature
Posted by Adrian Wiesmann <aw...@somap.org>.
Hello all
Sorry for commenting here and not in JIRA...
> Here's a dream: I run an ant target or a set of API calls with proper
> configuration against a database configured with Cayenne, it gives me a
> set of files or just one file, possibly some compressed archive format
> such as zip which contain all I need to recreate the same data under the
> same DBMS or a different one. So whenever needed, I can send this file
> or files to a colleague who would run a reverse ant target (or a set of
> API calls) and have the same database ready for use in the DBMS of his
> choice.
I did something you dream of. This is what we currently call Snapshot
files. A snapshot file contains one file per table. These files contain
xml-serialised DataObjects. Everything is then packed together in one
single ZIP file, together with a Manifest file which contains basic infos
regarding included tables, record count, size, signature etc.
If somebody is interested to include this in Cayenne I would be more than
happy to discuss our approach and share sources. Although we moved to
GPLv3 I/we own the copyright and re-licencing would not be a problem.
> Cayenne has plenty of good stuff which would make this possible and my
> team is currently implementing subset of this functionality tailored to
> our specifics: it requires some manual effort on the part of indicating
> the sequence in which the tables should be loaded, manual adjustment of
> primary key generation info after loading a table etc. Would be good to
> have this implemented in a core or an optional extension. The portable
> format should be versionable plain text such as XML or JSON - that would
> allow me to to use the VCS to keep my test data, demo data etc, properly
> versioned.
Primary key generation is not a problem in our solution. We only use UUID
as primary keys...
Cheers,
Adrian
[JIRA] Commented: (CAY-968) Portable Data with Cayenne - database
load/unload feature
Posted by "Ari Maniatis (JIRA)" <de...@cayenne.apache.org>.
[ https://issues.apache.org/cayenne/browse/CAY-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12692#action_12692 ]
Ari Maniatis commented on CAY-968:
----------------------------------
If you are using this for testing (and maybe even if you are not), then this is one approach:
http://www.dbunit.org/
> Portable Data with Cayenne - database load/unload feature
> ---------------------------------------------------------
>
> Key: CAY-968
> URL: https://issues.apache.org/cayenne/browse/CAY-968
> Project: Cayenne
> Issue Type: New Feature
> Components: Cayenne Core Library
> Affects Versions: UNDEFINED FUTURE
> Reporter: Michael Bergens
> Assignee: Andrus Adamchik
> Priority: Minor
>
> Here's a dream: I run an ant target or a set of API calls with proper configuration against a database configured with Cayenne, it gives me a set of files or just one file, possibly some compressed archive format such as zip which contain all I need to recreate the same data under the same DBMS or a different one. So whenever needed, I can send this file or files to a colleague who would run a reverse ant target (or a set of API calls) and have the same database ready for use in the DBMS of his choice.
> Cayenne has plenty of good stuff which would make this possible and my team is currently implementing subset of this functionality tailored to our specifics: it requires some manual effort on the part of indicating the sequence in which the tables should be loaded, manual adjustment of primary key generation info after loading a table etc. Would be good to have this implemented in a core or an optional extension. The portable format should be versionable plain text such as XML or JSON - that would allow me to to use the VCS to keep my test data, demo data etc, properly versioned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[JIRA] Commented: (CAY-968) Portable Data with Cayenne - database
load/unload feature
Posted by "Michael Bergens (JIRA)" <de...@cayenne.apache.org>.
[ https://issues.apache.org/cayenne/browse/CAY-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703#action_12703 ]
Michael Bergens commented on CAY-968:
-------------------------------------
DBUnit seems ok for *small* sets of data; but sometimes our test sets are quite beefy: hundreds of tables with many megs of info, DBUnit does not seems to scale well into those quantities.
Derby, HSQL, H2 are binary form therefore not versionable.
Ideal solution that adresses versioning, scales quite well is selective import/export into table-by-table xmls with exclusion of audit trail and transaction tables that are always huge and mostly useless for testing.
> Portable Data with Cayenne - database load/unload feature
> ---------------------------------------------------------
>
> Key: CAY-968
> URL: https://issues.apache.org/cayenne/browse/CAY-968
> Project: Cayenne
> Issue Type: New Feature
> Components: Cayenne Core Library
> Affects Versions: UNDEFINED FUTURE
> Reporter: Michael Bergens
> Assignee: Andrus Adamchik
> Priority: Minor
>
> Here's a dream: I run an ant target or a set of API calls with proper configuration against a database configured with Cayenne, it gives me a set of files or just one file, possibly some compressed archive format such as zip which contain all I need to recreate the same data under the same DBMS or a different one. So whenever needed, I can send this file or files to a colleague who would run a reverse ant target (or a set of API calls) and have the same database ready for use in the DBMS of his choice.
> Cayenne has plenty of good stuff which would make this possible and my team is currently implementing subset of this functionality tailored to our specifics: it requires some manual effort on the part of indicating the sequence in which the tables should be loaded, manual adjustment of primary key generation info after loading a table etc. Would be good to have this implemented in a core or an optional extension. The portable format should be versionable plain text such as XML or JSON - that would allow me to to use the VCS to keep my test data, demo data etc, properly versioned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[JIRA] Commented: (CAY-968) Portable Data with Cayenne - database
load/unload feature
Posted by "Tore Halset (JIRA)" <de...@cayenne.apache.org>.
[ https://issues.apache.org/cayenne/browse/CAY-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694#action_12694 ]
Tore Halset commented on CAY-968:
---------------------------------
Another option could be to use dataport (part of cayenne) to copy the model to a portable database like derby (or hsql) and then archive the files in zip. Your colleague could then load that data into her own database or just use the files with derby (or hsql).
http://cayenne.apache.org/doc/cdataport.html
http://cayenne.apache.org/doc/api/org/apache/cayenne/access/DataPort.html
> Portable Data with Cayenne - database load/unload feature
> ---------------------------------------------------------
>
> Key: CAY-968
> URL: https://issues.apache.org/cayenne/browse/CAY-968
> Project: Cayenne
> Issue Type: New Feature
> Components: Cayenne Core Library
> Affects Versions: UNDEFINED FUTURE
> Reporter: Michael Bergens
> Assignee: Andrus Adamchik
> Priority: Minor
>
> Here's a dream: I run an ant target or a set of API calls with proper configuration against a database configured with Cayenne, it gives me a set of files or just one file, possibly some compressed archive format such as zip which contain all I need to recreate the same data under the same DBMS or a different one. So whenever needed, I can send this file or files to a colleague who would run a reverse ant target (or a set of API calls) and have the same database ready for use in the DBMS of his choice.
> Cayenne has plenty of good stuff which would make this possible and my team is currently implementing subset of this functionality tailored to our specifics: it requires some manual effort on the part of indicating the sequence in which the tables should be loaded, manual adjustment of primary key generation info after loading a table etc. Would be good to have this implemented in a core or an optional extension. The portable format should be versionable plain text such as XML or JSON - that would allow me to to use the VCS to keep my test data, demo data etc, properly versioned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.