On 2/21/06, Cody Caughlan <[EMAIL PROTECTED]> wrote:
> Except that the UserRecord is empty. I am thinking that when I do a
> "PersonRecord.getUserRecord()", it internally does the .load() on PersonID
> because I have told it to in the above XML.

Yes, inside the PersonRecord.getUserRecord() method that is generated,
it does this:

<cfset variables.personRecord.setpersonid(getid()) />
<cfset variables.personRecord.load() />

So, unless the personid column is a key column, it won't load anything.

So the question is: philosophically, should this really work?

If the answer is YES, then record.project.xsl needs to change to
generate the fieldlist in the load() call for any relationships that
are defined. Changing line 127 from this:

&lt;cfset variables.<xsl:value-of select="@alias"/>Record.load() /&gt;

to this:

&lt;cfset variables.<xsl:value-of
select="@alias"/>Record.load('<xsl:for-each
select="relate"><xsl:value-of select="@to" />,</xsl:for-each>') /&gt;

has the desired behavior in this case but I've no idea what it would
break in other cases. (and, yes, it's a fugly hack but I don't know
enough XSL (yet) to come up with a more elegant solution)
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood



-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/


Reply via email to