Author | Message |
---|---|
jigar_gaglani
Posts: 16
|
Posted 21:42 Apr 19, 2009 |
Hello professor, I created a model , a .hbm.xml file under src/hbm/blog package. I wrote mapping statement in hibernate.cfg.xml & edited the url,username & password depending on my local machine. I executed the hbm2ddl target from build.xml which changed the csns.ddl file by adding create statement in it, then I also added the necessary SQL statements in csns-create.sql , csns-drop.sql & csns-test-insert.sql and build the project once. Still I cannot find the table created in my postgresql database. Can you please help me out where I might be going wrong?
|
abhishek_sharma
Posts: 79
|
Posted 21:49 Apr 19, 2009 |
Hi Professor, Please guide me how to create table in our csns database , I had followed the class video but still didn't got sucess in order to create tables for blog's Thanks |
cysun
Posts: 2935
|
Posted 22:20 Apr 19, 2009 |
You updated the SQL scripts. but you still need to run them to create the tables in the database. The easiest way is first run csns-drop.sql, then csns-create.sql. You can also execute only the new statements for the blog tables. |
cysun
Posts: 2935
|
Posted 22:26 Apr 19, 2009 |
Like I said in the previous post, either run the scripts csns-drop.sql and csns-create.sql (assuming that they include the SQL statements for the blog tables), or just run the new statements themselves. If you don't know how to execute scripts/statements using psql or PgAdmin, read online documentation. |
jigar_gaglani
Posts: 16
|
Posted 22:36 Apr 19, 2009 |
Thank you professor. It worked. :) |
abhishek_sharma
Posts: 79
|
Posted 22:36 Apr 19, 2009 |
Thank you Professor, Your suggestion is worked fine for me
|