Hello!
I have a class with following properties:
Code:
public class Action {
private int actionId;
private String className;
private final Map<String, String> labels = new HashMap<String, String>();
[... Getters and Setters ...]
}
The mapping file is following
Code:
<hibernate-mapping>
<class name="ch.arpage.collaboweb.model.Action" table="actions" catalog="collaboweb" lazy="false">
<comment></comment>
<id name="actionId" type="int">
<column name="ACTION_ID" />
<generator class="assigned" />
</id>
<property name="className" type="string">
<column name="CLASS" length="100">
<comment></comment>
</column>
</property>
<map name="labels" table="action_labels" cascade="all">
<key column="ACTION_ID"/>
<map-key type="string" column="LANGUAGE"/>
<element type="string" column="LABEL"/>
</map>
</class>
</hibernate-mapping>
When in my application I call t
Code:
Action action = new Action();
action.setClassName("actions.Test");
action.setLabel("de", "Test");
action.setLabel("en", "Test");
getHibernateTemplate().save(action);
then, the action object is saved in the actions table but the action_labels table (mapped on labels Map) is
not saved.
Do you see what I did wrong?
Thanks a lot and regards,
Patrick
[/code]