I’ve run into a bit of a snag that there doesn’t appear there is an
easy answer to. I have a table that contains a foreign key that I
need to reference back to a primary key. In the transfer config, it
appears that when defining relationships it’s always the table that
contains the primary key is the table that defines the relationship to
the foreign key.
<object name=”user” table=”blogDemo.user” >
<id name=”id” type=”numeric” column=”user_id”>
<property name=”firstName” type=”string” column=”first_name”/>
<property name=”lastName” type=”string” column=”last_name”/>
<onetomany name=”post”>
<link column=”post_id” to=”blogDemo.post”/>
<collection type=”array”>
<order property=”id” order=”desc”/ >
</collection>
</onetomany>
</object>
<object name=”post” table=”blogDemo.post”>
<id name=”id” type=”numeric” column=”post_id />
<property name=”postTitle” type=”string” column=”post_title” />
<property name=”postBody” type=”string” column=”post_body” />
<property name=”postStatusId” type=”string” column=”post_status_id”/>
</object>
<object name=”postStatus” table=”blogDemo.postStatus”>
<id name=”id” type=”numeric” column=”post_status_id”/>
<property name=”code” column=”post_code” ./>
</object>
What I’m looking to do is add the status into the “post” object but it
appears that I can only define the relationship in the postStatus
object. Is there any way to do this?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---