Kevin, you may want to look at: http://docs.transfer-orm.com/wiki/Handling_Null_Values.cfm http://docs.transfer-orm.com/wiki/Transfer_Configuration_File.cfm#manytoone
Mark On Tue, Nov 18, 2008 at 8:27 PM, Kevin Roche <[EMAIL PROTECTED]> wrote: > > Hi, > > I want to check how a table column that supports a relationship should be > defined. > > I have the following in my transfer XML file. > > <package name="Price"> > <object name="Price" table="Price"> > <id name="priceId" column="priceId" type="numeric"/> > <property name="packageId" column="packageId" type="numeric" > nullable="false" /> > <property name="featureId" column="featureId" type="numeric" > nullable="true" /> > <property name="periodCovered" column="periodCovered" > type="string" nullable="false" /> > <property name="billingRate" column="billingRate" > type="string" nullable="false" /> > <property name="startDate" column="startDate" type="date" > nullable="true" /> > <property name="endDate" column="endDate" type="date" > nullable="true" /> > <property name="price" column="price" type="numeric" > nullable="false" /> > <property name="isSpecialOffer" column="isSpecialOffer" > type="boolean" nullable="false" /> > <property name="isActive" column="isActive" type="boolean" > nullable="false" /> > </object> > </package> > > In fact packageId and FeatureId are both foreign key fields so I propose to > add two many to one entries: > > <package name="Price"> > <object name="Price" table="Price"> > <id name="priceId" column="priceId" type="numeric"/> > <property name="packageId" column="packageId" type="numeric" > nullable="false" /> > <property name="featureId" column="featureId" type="numeric" > nullable="true" /> > <property name="periodCovered" column="periodCovered" > type="string" nullable="false" /> > <property name="billingRate" column="billingRate" > type="string" nullable="false" /> > <property name="startDate" column="startDate" type="date" > nullable="true" /> > <property name="endDate" column="endDate" type="date" > nullable="true" /> > <property name="price" column="price" type="numeric" > nullable="false" /> > <property name="isSpecialOffer" column="isSpecialOffer" > type="boolean" nullable="false" /> > <property name="isActive" column="isActive" type="boolean" > nullable="false" /> > > > <manytoone name="Feature"> > <link to="Feature.Feature" column="featureId" /> > </manytoone> > <manytoone name="Package"> > <link to="Package.Package" column="packageId" /> > </manytoone> > > </object> > </package> > > Should the property tags be removed at the same time? If so how do I specify > that the featureId is optional since there seems not to be an equivalent to > nullable="true"? > > Kevin Roche > > > > > -- E: [EMAIL PROTECTED] W: www.compoundtheory.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
