Hi, I'm using Transfer to manage my keys. For example.

<id name="HistoryID" column="history_id" type="GUID" generate="true" /
>

Is there a way to get Transfer to generate the GUID, before the object
is saved?

At the moment I'm having to save the History object twice (the first
time is an insert, then an update). Something like this:

<cfset History = getTransfer().get( "History" ) />

<cfset invalidCounter = 0 />
<!--- set a value we will overwrite as it is a required property --->
<cfset History.setInvalid( invalidCounter ) />
<!--- save the history object to populate the id --->
<cfset getTransfer().save( History ) />

<cfloop from="1" to="#ArrayLen( arrayOfStructsFromFlex )#"
index="index">
  <cfset Result = getTransfer().new( "Result" ) />
  <cfif !arrayOfStructsFromFlex[ index ].IsValid>
    <cfset invalidCounter ++ />
  </cfif>
  <cfset Result.setHistory( History ) />
  <cfset getTransfer().save( Result ) />
</cfloop>

<cfset History.setInvalid( invalidCounter ) />
<cfset getTransfer().save( History ) />
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to