ReverseUUID fields with versioned content

Just hope I’m not missing a trick here.

I’m looking to setup a parent-child relationship between two content types that are both versioned. Adding a UUID field to the child type works great, however trying to setup the ReverseUUID field on the parent fails to show the children when editing (as far as I can see).

I think this is because when editing, you are working on the draft version of the parent, but all the children point to the approved content. The query used seems to be here:

Perhaps the where clause should be replaced by:

    WHERE #arguments.stMetadata.ftJoinProperty# IN (<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.stObject.objectid#" />

<cfif StructKeyExists(arguments.stObject, "status") AND arguments.stObject.status neq "approved" AND StructKeyExists(arguments.stObject, "versionid") AND Len(arguments.stObject.versionid) >

    , <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.stObject.versionid#" />

</cfif>

)

Cheers

1 Like