I am using Hibernate 2.1.4 with XDoclet 1.2.1.
I have a unidirectional many-to-many association A * -------> * B
A and B have primary keys of type String (char(32)).
I want to generate the association table with the 2 foreign keys if type char(32).
This XDoclet tags:
* @hibernate.set
* role="bs"
* table="A_B_LNK"
* lazy="true"
* cascade="save-update"
* @hibernate.collection-key
* column="A_ID"
* @hibernate.collection-many-to-many
* column="B_ID"
* class="mypackage.B"
generates the following assication table:
create table A_B_LNK (
A_ID VARCHAR(255) not null, -- needed char(32)
B_ID VARCHAR(255) not null, -- needed char(32)
primary key (A_ID, A_ID)
);
I tried to use the "@hibernate.column" but id did not work with "hibernate.collection-key" or "hibernate.collection-many-to-many"
Any suggestion.
Thank you
|