-->
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.  [ 6 posts ] 
Author Message
 Post subject: bug in h_2.1.6 about setter/getter for inverse Set elements?
PostPosted: Thu Aug 26, 2004 4:02 am 
Newbie

Joined: Thu Aug 26, 2004 3:31 am
Posts: 3
Hi,

Configuration:
Hibernate Synchronizer 2.3.1
Hibernate 2.1.6
Oracle 9.2.0.1.0

We generated ".hbm.xml"s using Hibernate Synchronizer from our Oracle DB, then we generated POJOs with Hibernate's generator (hbm2java). Generated codes is OK but Hibernate is complaining about set elements' name attribute that it couldn't find appropriate setter/getter methods.

For example set element named "eVRAKDURUMSet"

public Set getEVRAKDURUMSet() {

return this.eVRAKDURUMSet;
}

public void setEVRAKDURUMSet(Set eVRAKDURUMSet) {

this.eVRAKDURUMSet = eVRAKDURUMSet;
}

methods exists in the POJO but Hibernate is searching(?) two methods named "geteVRAKDURUMSet" and "seteVRAKDURUMSet". When we capitalize the "e" of "eVRAKDURUMSet" in the hbm.xml it solves the problem.

<hibernate-mapping package="com.hede.hodo.hadi.pojo">
<class name="Evrakdagitim" table="EVRAKDAGITIM">
<id column="ID" name="id" type="integer">
<generator class="vm"/>
</id>
<property column="DISKURUMADI" length="100" name="diskurumadi" not-null="false" type="string"/>
<property column="DOSYANO" length="30" name="dosyano" not-null="false" type="string"/>
<many-to-one class="Alicisatici" name="alicisaticiref" not-null="true">
<column name="ALICISATICIREF"/>
</many-to-one>
<many-to-one class="Evrak" name="evrakref" not-null="true">
<column name="EVRAKREF"/>
</many-to-one>
<many-to-one class="Personel" name="personelref" not-null="true">
<column name="PERSONELREF"/>
</many-to-one>
<many-to-one class="Dagitimlistesablon" name="listeref" not-null="true">
<column name="LISTEREF"/>
</many-to-one>
<set inverse="true" lazy="true" name="eVRAKDURUMSet">
<key column="EVRAKDAGITIMREF"/>
<one-to-many class="Evrakdurum"/>
</set>
<set inverse="true" lazy="true" name="dAGITIMLISTECIKACAKBIRIMSet">
<key column="EVRAKREF"/>
<one-to-many class="Dagitimlistecikacakbirim"/>
</set>
</class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 26, 2004 4:05 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Hibernate follows the JavaBean specification for property/accessor method naming. Please read it. Also, don't call things a bug, as per the BIG RED MESSAGE.

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 26, 2004 4:34 am 
Newbie

Joined: Thu Aug 26, 2004 3:31 am
Posts: 3
I know that You are following the specifications.

Sorry about your rule that I couldn't have enough time to read it (Don't start your question with "a bug in Hibernate"!)

But keep in mind that "bugless code" means such a perfect thing that it doesn't need any of our feedback about problems. I am not an English or American man. How can I express a problem to you in other words instead of a bug (with a question mark)?

In my opinion; your replies (I mean hibernate team) is "too short" for beginners. We prefer you even not to reply them.

I am sure that my message was not read carefully also. Please read it.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 26, 2004 4:41 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Well, you surely won't get a reply from me again...

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 26, 2004 4:53 am 
Newbie

Joined: Thu Aug 26, 2004 3:31 am
Posts: 3
Conguratulations!

I have read your messages 2 or 3 weeks ago while we were trying our first Hibernate related examples. At that time I asked myself "What sould I do if I take a reply like the other beginners had taken from them?"

You can be sure that Hibernate team won't get any post from me about not yet known bugs anymore clever man.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 26, 2004 5:00 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
(1) your "question" is answered in the FAQ
(2) you disobeyed the rules of the forum
(3) now you start insulting us

I have all kinds of things I could say to you, but I am trying very, very hard to change my behavior here and not get angry when things like this happen.

So, I'll instead politely ask you to reconsider how you approached this problem, read the forum rules, read the FAQ, and don't act like this again.

Thanks for your consideration.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.