-->
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.  [ 2 posts ] 
Author Message
 Post subject: PrimaryKey type TEXT
PostPosted: Thu Nov 13, 2003 12:54 pm 
Beginner
Beginner

Joined: Thu Oct 30, 2003 6:29 am
Posts: 30
Location: Germany, KA
hi,

i had the problem on many:many-mappings that the generated PK exceeds the max. length of 500. So I wrote my own MySQL-dialect, setting String to VARCHAR(250).
Would work fine, I thought. But now, the PK-Column is mapped to TEXT!

<id
name="uid"
column="UID"
type="java.lang.String"
>
<generator class="uuid.hex">
</generator>
</id>

<discriminator
column="class"
type="string"
/>


I could use the the attribute 'sql-type="VARCHAR(250)"' in <id> but this causes DTD-validation problems.

How do you guys handle many:many-relationships with mySQL? I mean: there must be another way than writing an own Dialect.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 13, 2003 1:03 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
use the length attribute


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