The tables are created using the hibernate3-maven-plugin, specifically
the "hbm2ddl" goal.
http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/
This gets the class names from src/main/resources/hibernate.cfg.xml
and then looks up the annotations of those classes.
HTH,
Matt
On 4/9/07, nmall <[EMAIL PROTECTED]> wrote:
Hi
Sorry to be posting a lot but I could not find this in the forums.
1) In the tutorial, it explicitly says Appfuse assumes project name and
database instance name are the same. But if I were to change the name of the
database in the jdbc in the line below to be different from hte project
name, is it supposed to work?
<jdbc.url><![CDATA[jdbc:mysql://localhost/basicapp?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf-8]]></jdbc.url>
2) When we run mvn jetty:run-war, you see the following DDL generated. What
is this based on - is it completely dynamically generated from
sample-data.xml and the annotations. I don't see the same order in which it
is declared in sample-data.xml.
alter table user_role drop foreign key FK143BF46AF503D155;
alter table user_role drop foreign key FK143BF46A4FD90D75;
drop table if exists role;
drop table if exists app_user;
drop table if exists user_role;
create table role (id bigint not null auto_increment, name varchar(20
), description varchar(64), primary key (id)) type=InnoDB;
create table app_user (id bigint not null auto_increment, username varcha
r(50) not null unique, email varchar(255) not null unique, password_hint
varchar
(255), first_name varchar(50) not null, last_name varchar(50) not null,
phone_nu
mber varchar(255), website varchar(255), account_expired bit not null,
account_l
ocked bit not null, credentials_expired bit not null, city varchar(50) not
null,
province varchar(100), postal_code varchar(15) not null, address
varchar(150),
country varchar(100), account_enabled bit, version integer, password
varchar(255
) not null, primary key (id)) type=InnoDB;
create table user_role (user_id bigint not null, role_id bigint not null,
primar
y key (user_id, role_id)) type=InnoDB;
alter table user_role add index FK143BF46AF503D155 (user_id), add constraint
FK1
43BF46AF503D155 foreign key (user_id) references sa_account_user (id);
alter table user_role add index FK143BF46A4FD90D75 (role_id), add constraint
FK1
43BF46A4FD90D75 foreign key (role_id) references sa_account_role (id);
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [dbunit:operation {execution: test-compile}]
[INFO] [surefire:test]
[INFO] Surefire report directory: C:\work\newapp\target\surefire-reports
Thanks a lot for any information on this!
--
View this message in context:
http://www.nabble.com/Question-about-Database-instance-name%2C-generating-DDL-tf3549627s2369.html#a9909668
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
http://raibledesigns.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]