-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Mapping file Help
PostPosted: Wed Apr 14, 2004 10:42 am 
Newbie

Joined: Tue Feb 24, 2004 9:15 am
Posts: 16
Hello,

Anyone interested in helping me create the hibernate mapping files for Petshop database schema.

I am having a difficult time with hibernate mapping file. I know its a simple schema but I am a new to hibernate. I am trying to learn how to integrate all these frameworks. I have got the tapestry and spring part right. Once this is completed, anyone use it for learning.

Thank you.

--------------------------------schema--------------------------

CREATE TABLE useraccount (userid varchar(80), pwd varchar(25),email varchar(80), firstname varchar(80), lastname varchar(80), status char(2), addr1 varchar(80), addr2 varchar(40), city varchar(80), state varchar(80), zip varchar(20), country varchar(20), phone varchar(80), langpref varchar(80), favcategory varchar(80), mylistopt integer, banneropt integer,PRIMARY KEY(userid) );
INSERT INTO useraccount (userid, pwd ,email, firstname, lastname, status, addr1, addr2, city, state, zip, country, phone, langpref, favcategory, mylistopt, banneropt) VALUES ('j2ee','j2ee','yourname@yourdomain.com','ABC','XYX','OK','901 San Antonio Road','UCUP02-666','Palo Alto','CA','94303','USA','555-555-5555','en_US','DOGS',1,1);


CREATE TABLE bannerdata ( favcategory varchar(80), bannername varchar(80) NOT NULL, PRIMARY KEY(favcategory) );
INSERT INTO bannerdata (favcategory, bannername) VALUES ('BIRDS','banner_birds.gif');
INSERT INTO bannerdata (favcategory, bannername) VALUES ('CATS','banner_cats.gif');
INSERT INTO bannerdata (favcategory, bannername) VALUES ('DOGS','banner_dogs.gif');
INSERT INTO bannerdata (favcategory, bannername) VALUES ('FISH','banner_fish.gif');
INSERT INTO bannerdata (favcategory, bannername) VALUES ('REPTILES','banner_reptiles.gif');


CREATE TABLE category ( catid varchar(10), PRIMARY KEY(catid) );
INSERT INTO category (catid) VALUES ('BIRDS');
INSERT INTO category (catid) VALUES ('CATS');
INSERT INTO category (catid) VALUES ('DOGS');
INSERT INTO category (catid) VALUES ('FISH');
INSERT INTO category (catid) VALUES ('REPTILES');


CREATE TABLE categorydetails ( catid varchar(10), locale varchar(10) NOT NULL, name varchar(80) NOT NULL, PRIMARY KEY(catid, locale) );
INSERT INTO categorydetails (catid, locale, name) VALUES ('BIRDS','en_US','Birds');
INSERT INTO categorydetails (catid, locale, name) VALUES ('CATS','en_US','Cats');
INSERT INTO categorydetails (catid, locale, name) VALUES ('DOGS','en_US','Dogs');
INSERT INTO categorydetails (catid, locale, name) VALUES ('FISH','en_US','Fish');
INSERT INTO categorydetails (catid, locale, name) VALUES ('REPTILES','en_US','Reptiles');
INSERT INTO categorydetails (catid, locale, name) VALUES ('BIRDS','pt_PT','P


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 6:59 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
I don't think starting with the most complex scenario is the right way to learn a new tool.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.