I understand when doing a "manytoone" relationship that you can't have this:
<object name="Order">
<id name="id" type="numeric" />
<property name="fkiduser" type="numeric" />
<onetomany name="User">
<link column="fkiduser" to="user.User" />
</onetomany>
</object>
because you need to remove the "fkiduser" property.
However, I'm having the issue in a onetomany relationship and can't
figure out a way around it. The doc state you need to remove the
property, but given how onetomany relationships are set up in the XML,
I don't know how to accomplish that.
So, if the configuration was like the following, how would you get rid
of that error when doing an insert?
<object name="owners" table="owners">
<id name="ownerID" column="ownerID" type="numeric" generate="false" />
<onetomany name="dogs">
<link to="dogs" column="ownerID" />
<collection type="array">
<order property="dogID" order="asc" />
</collection>
</onetomany>
</object>
<object name="dogs" table="dogs">
<id name="dogID" column="dogID" type="numeric" generate="false" />
<property name="ownerID" type="numeric" column="ownerID"
nullable="false" />
</object>
[The error occurs when trying to insert a new "dog"]
I can't remove the "ownerID" property from the dogs object, because
then it tries to insert a null, and I don't know how to set it (since
there's no setter or getter for that property).
Maybe I'm just not understanding how this is supposed to work (updates
work, but that's probably because the update statement has the column
listed twice, but that doesn't throw an error)
Scott
--
-----------------------------------------
Scott Brady
http://www.scottbrady.net/
--
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
You received this message because you are subscribed to the Google Groups
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/transfer-dev?hl=en