| Author |
Message |
|
|
Post subject: mapping bug?
Posted: Jun 21, 2006 - 03:14 PM
|
|
|
|
When I use this code:
| Code: |
<set name="comments" table="TRACK_COMMENTS">
<key column="TRACK_ID" />
<element type="string" column="COMMENT" />
</set>
|
It creates a set of type null, but shouldn't it be of type String?
private java.util.Set<null> comments;
Anyone know why this is the case? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jun 22, 2006 - 10:35 AM
|
|
|
|
Same Guy ^^
Here is another mapping that causes the generated code to give a type of null:
| Code: |
<list name="tracks" table="ALBUM_TRACKS">
<meta attribute="use-in-tostring">true</meta>
<key column="ALBUM_ID" />
<index column="POSITION" />
<composite-element class="com.orielly.hh.AlbumTrack">
<many-to-one name="track"
class="com.orielly.hh.Track">
<meta attribute="use-in-tostring">true</meta>
<column name="TRACK_ID" />
</many-to-one>
<property name="disc" type="integer" />
<property name="positionOnDisc" type="integer" />
</composite-element>
</list>
|
It maps to this: private java.util.List<null> tracks;
But it should be private java.util.List<com.orielly.hh.AlbumTrack> tracks;
I am using Hibernate 3.0, and the examples I am getting this from is 2.0. Did the semantics change between versions which h-sync doesn't look out for? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jun 22, 2006 - 10:52 AM
|
|
Joined: Jun 22, 2006
Posts: 3
|
|
|
|
|
 |
|
|
Post subject:
Posted: Jun 29, 2006 - 04:45 AM
|
|
|
|
Hi there !
I got mapping generation bug too, don't know if it's the same as you two...
I use SQLServer05, Hibernate3.0 and jtds1.2, and when I want to generate hbm files, sometimes (and I just don't understand the rule for that), it didn't take the constraint to generate code...
Ex :
It put an pk in a property tag and not in an id tag
It did't make many-to-one and other relation, it put all in property tag
Did someone know something about this bug ?
Thx
Khazrak
PS : s'cuse my english, I'm from switzerland ^^ |
|
|
| |
|
|
|
 |
|
|
|
Post subject:
Posted: Feb 04, 2008 - 04:36 AM
|
|
Joined: Jan 15, 2008
Posts: 5
|
|
|
|
|
 |
|
|
Post subject:
Posted: Feb 04, 2008 - 05:38 AM
|
|
Joined: Jan 15, 2008
Posts: 5
|
|
|
|
|
 |
|
|
| |