This seems like such a simple thing to accomplish, but I'm having a difficult time with the array index when I attempt to delete any single item within a mapped array.
Here's my mapping file:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false">
<class name="com.brightharbour.schema.UserType, BH.Service" table="Users" lazy="false">
<id name="UserId" column="UserId" type="String">
<generator class="assigned" />
</id>
<property name="Password" type="String"/>
<property name="Name" type="String"/>
<property name="Email" type="String"/>
<array name="SongPlaylists" table="SongPlaylists" cascade="all-delete-orphan">
<key column="UserId"/>
<index column="SongPlaylistsIndex" />
<one-to-many class="com.brightharbour.schema.SongPlaylistInfoType, BH.Service"/>
</array>
</class>
</hibernate-mapping>
Now, when I attempt to delete any single item in the SongPlaylists array (session.Delete), my index gets messed up. I realize that using a list would be much easier, but I'm stuck with an array for reasons that aren't negotiable.
Any thoughts/ideas are appreciated -- feel like a dummy that I can't figure out how to get this working just right.[/code]