Ticket #295 (closed defect: fixed)

Opened 19 years ago

Last modified 14 years ago

Transfer scaffolding - problem with composed objects with aliased properties

Reported by: jmetcher Owned by: boomfish
Priority: normal Milestone: 3.1 Maintenance Beta
Version: Severity: normal
Keywords: Cc:

Description

Edit scaffold breaks for a transfer object that has a onetomany relationship with another transfer object, where the second object has aliased ID and properties (e.g. the "name" is different to the "column".

Suggest the following:

Index: C:/Documents and Settings/jmetcher/workspace2/modelglue ber/ModelGlue/unity/orm/transfer/TransferAdapter.cfc =================================================================== --- C:/Documents and Settings/jmetcher/workspace2/modelglue ber/ModelGlue/unity/orm/transfer/TransferAdapter.cfc (revision 302) +++ C:/Documents and Settings/jmetcher/workspace2/modelglue ber/ModelGlue/unity/orm/transfer/TransferAdapter.cfc (working copy) @@ -256,11 +256,11 @@

</cfif>

<cfset arguments.field.sourceObject = arguments.relationship.name />

- <cfset arguments.field.sourceColumn = fields[1].name /> + <cfset arguments.field.sourceColumn = fields[1].alias />

<cfloop from="1" to="#arrayLen(fields)#" index="i">

<cfif fields[i].primaryKey>

- <cfset arguments.field.sourceKey = fields[i].name /> + <cfset arguments.field.sourceKey = fields[i].alias />

</cfif>

</cfloop>

@@ -268,7 +268,7 @@

<cfif fields[i].cfDataType eq "string"

and right(fields[i].name, 2) neq "id" and fields[i].length lt 65535>

- <cfset arguments.field.sourceColumn = fields[i].name /> + <cfset arguments.field.sourceColumn = fields[i].alias />

<cfbreak />

</cfif>

</cfloop>

Change History

Changed 16 years ago by DanWilson

  • milestone set to 3.1.x-next-patch

thithis is pretty much the same ticket as 315 and while they are both targeted at V2, we need to make sure V3 doesn't have the same bug. Fix one, close both

Changed 16 years ago by boomfish

  • owner changed from somebody to boomfish
  • status changed from new to assigned

Closed #315 as a duplicate of this ticket.

Changed 16 years ago by boomfish

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in SVN commit 258.

Note: See TracTickets for help on using tickets.