Hello everyone! I hope someone can help me with this.. Deadline coming closer.. :|
I have a problem when mapping a Map<Entity, String>.
@MapKeyManyToMany(joinColumns={@JoinColumn(referencedColumnName="Pk")})
@CollectionOfElements
@Cascade({CascadeType.ALL})
public Map<CarBrand, String> getDepartmentCarbrandId() {
return departmentCarbrandId;
}
The problem is that the mapkey column(for CarBrand) in the database (postgres 8.2) becomes of bytearray type instead of mapping the Pk(for CarBrand as Long). I've tried different variations of @JoinTable(name="Pk") The Map persists but with the entity serialized. The owning Entity maps to PK and the String to Varchar.
I'm using JBoss 4.0.4 GA which I think has hibernate 3.2.0.cr4.
Any clues anyone? Extremly greatful for any insights.
Best regards,
Niclas Lindberg
|