-->
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: Reload or Update *.hbm.xml file problem using Netbeans5
PostPosted: Mon Jun 12, 2006 4:30 am 
Newbie

Joined: Mon Jun 12, 2006 4:11 am
Posts: 6
Hi, all:

I met a strange problem using hibernate 3 in Netbeans5. When I wrote an Applicant.hbm.xml, I mistyped my Applicant table id name:
--------------------------Wrong Config----------
<id name="id" > (its column should be applicant_id)
<generator class="sequence">
<param name="sequence">applicants_applicant_id_seq</param>
</generator>
</id>
--------------------------Right Config---------------------------
<id name="id" type="long" column = "applicant_id">
<generator class="sequence">
<param name="sequence">applicants_applicant_id_seq</param>
</generator>
</id>
----------------------------------------------------
After I made the modification, I found that it was not reloaded or changed in my program. The error always was same as follow:
--------------------------------------------------------
org.postgresql.util.PSQLException: ERROR: column applicant0_.id does not exist
--------------------------------------------------------
It showed that my program did not replace the "id" using "applicant_id"
But I did save the mapping file. When I had to change my table column "applicant_id" to "id", it worked but that was not the effect I wanted.
I think there must be a cache in which the mapping files were stored but It still did not worked after I restarted my netbeans5.
---------------------------------------------------
My questions are:
1. Is there a cache to store the mapping files and how can i reload it after i change the mapping files?
2. If not, what 's the problem with my mapping files?
------------------------------------------------
Could anyone help?
Thanks!


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.