wvrossem / salesmen

Auctioning web application using the Seam Framework for JBoss AS
http://wilma.vub.ac.be/~se2_0910/
1 stars 0 forks source link

Populating database upon deployment #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As it is pleasant to have a somewhat populated DB from time to time, I
tried to find out how to do this.
JBoss/Hibernate uses a file called import.sql which can be found in the
exploded archives. I imagined this file would be a copy of one of the
following files, found in /salesmen/resources:
- import-dev.sql
- import-prod.sql
- import-test.sql

Both -prod and -test are empty, while import-dev.sql clearly contains the
data that can be found after a deploy (see userList).

However, I added my very own sql statement (see below), and my
category-table is not filled by it.

SQL: insert into category (id, name, version, parent_id) values (1,"Root
category",0,0);
(Note: I also tried several different SQL statements, all without success).

Original issue reported on code.google.com by datan...@gmail.com on 20 Feb 2010 at 3:48

GoogleCodeExporter commented 9 years ago
Please note that @Version is controlled by the PersistenceManager for 
coordinating 
concurrent access to the persisted object. As you can see, it's setter is 
private so 
that should be accessed.

Original comment by sina.hes...@gmail.com on 20 Feb 2010 at 5:54

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r886.

Original comment by sina.hes...@gmail.com on 20 Feb 2010 at 6:35

GoogleCodeExporter commented 9 years ago
See also:
http://groups.google.com/group/salesmen/browse_thread/thread/4f34c81d6d08dd58

Original comment by sina.hes...@gmail.com on 20 Feb 2010 at 6:48