First, thank you for hibernate. I'm just getting started, but it looks amazing.
I'm using v3. In my mapping file, I have the following in my mapping file:
Code:
...
<map name="features" table="UserFeatures" cascade="all">
<key column="Id" />
<map-key column="word" type="string" />
<composite-element class="norgould.model.UserFeature">
<property name="score" type="float" />
<property name="occurances" type="long" />
</composite-element>
</map>
...
In my code, I call
Code:
...
feature = new UserFeature();
feature.setScore(1.0f);
feature.setOccurances(1L);
user.getFeatures().put(term, feature);
...
(where user is the object that was loaded in the session).
After the session is flushed and closed, no rows were added to the database.
I checked and user.getFeatures() is a PersistentMap. I'm sure I'm doing something simple wrong, but I'm completely at a loss.
[[If there's no way to make it cascade, is there a way to have it manually?]]
Thank you very much for any help.
Dan