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!
|