..except for the fact that 'Order' is a reserved word in SQL, I bet you that
is what is causing the issue..

What is the generated SQL?

Mark

On Mon, Jun 1, 2009 at 9:48 AM, Matthew <[email protected]> wrote:

>
> Hi Mark
>
> Nope: the table isn't called Orders. I've started from scratch and
> build 2 new tables testOrders/testUser just to issolate these objects
> to rule out other relationships.
>
> There's not much more in the error just "null null The error occurred
> on line -1."
>
> I think the problem is that CF is going into an infinite loop because
> of recursive referencing (so perhaps to avoid crashing it just throws
> a "null null").
>
> To take 1 step back if you use the following XML I get this error "The
> object 'Order' has a recursive link back to itself through composition
> 'Orders'. You will need to set one of the elements in this chain to
> lazy='true' for it to work.":
>
> <object name="User" table="testUser">
>         <id name="userId" type="numeric"></id>
>        <property name="firstName" type="string" />
>        <onetomany name="Orders">
>                 <link to="Order" column="userId" />
>                <collection type="array"></collection>
>        </onetomany>
> </object>
> <object name="Order" table="testOrder">
>        <id name="orderId" type="numeric"></id>
>        <property name="userId" type="numeric" />
>        <property name="totalPrice" type="numeric" />
>        <property name="deliveryName" type="string" />
>        <manytoone name="OrderUser">
>                <link to="User" column="userId" />
>        </manytoone>
> </object>
>
> When I add  lazy="true" to either the o2m or m2o the page loads fine.
> I can in fact dump the none-lazy array but if I try to dump the lazy
> array it throws the "null null" error - e.g. if I change the XML to
> the following and try to call getOrdersArray():
>
> <object name="User" table="testUser">
>         <id name="userId" type="numeric"></id>
>        <property name="firstName" type="string" />
>        <onetomany name="Orders" lazy="true">
>                <link to="Order" column="userId" />
>                <collection type="array"></collection>
>        </onetomany>
> </object>
> <object name="Order" table="testOrder">
>        <id name="orderId" type="numeric"></id>
>        <property name="userId" type="numeric" />
>        <property name="totalPrice" type="numeric" />
>        <property name="deliveryName" type="string" />
>        <manytoone name="OrderUser">
>                <link to="User" column="userId" />
>        </manytoone>
> </object>
>
> Cheers
> Matthew
>
> On May 29, 4:17 pm, Mark Mandel <[email protected]> wrote:
> > I don't suppose the table you are pointing at for 'Orders' name is
> 'Order',
> > or anything weird like that?
> >
> > Can we get the full error though?
> >
> > Mark
> >
> >
> >
> > On Fri, May 29, 2009 at 2:48 PM, Matthew <[email protected]>
> wrote:
> >
> > > Hi
> >
> > > I keep getting the follow error "null null" when I try to call
> > > get*Array() on a onetomany which is setup to lazy load.
> >
> > > The documentation says that what I've done is fine (http://
> > > docs.transfer-orm.com/wiki/Using_Lazy_Loading.cfm) so I can't work out
> > > what's wrong?
> >
> > > Here's my Transfer XML config:
> >
> > > <object name="User">
> > >        <id name="userId" type="numeric"></id>
> > >        <property name="firstName" type="string" />
> > >        <onetomany name="Orders" lazy="true">
> > >                <link to="Order" column="userId" />
> > >                <collection type="array"></collection>
> > >        </onetomany>
> > > </object>
> >
> > > I'm trying to call user.getOrdersArray() but get the error. I can call
> > > user.getUserId() and user.getFirstName() no problem.
> >
> > > Setup: Transfer 1.1, CF 7
> >
> > > Cheers
> > > Matthew
> >
> > --
> > E: [email protected]
> > W:www.compoundtheory.com
> >
>


-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to