-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate not responding to Table name.
PostPosted: Wed Apr 13, 2011 4:41 am 
Newbie

Joined: Mon Nov 09, 2009 11:54 pm
Posts: 2
In my web application (a simple app), I created a hibernate mapping file, customer.hbm.xml. I mapped Customer.java to CUSTOMER table. Customer.java is serializable and has a constructor.

A user can fill in their personal details (Name, Address etc) and that information should persist in CUSTOMER TABLE.
Each Customer is uniquely identified by CUSTOMER_ID (populated from a Oracle Sequence).

I am using a HibernateDaoSupport based Dao layer. From Dao, when I acquire and call session.save(customer), it does not do anything. No error, nothing. The only query it generates is for fetching nextval from CUST_SEQ. It does not generate any query for inserting customer data into the CUSTOMER table.

I changed the table name to a random name (anything but ""). It did not throw any error like "Table does not exists".
But any change to the name of Sequence is detected and error is thrown.

When I remove the table name (keep it empty) and say <class = "Customer" table = "">, it does notice that there is no table name specified.

Am I missing any key factor here in the configuration? Is this a known problem? Any input in this regard will be appreciated.
I am using Hibernate 3.6 along with Spring 3+.
Regards.


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

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.