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