What does setProductId() do?

It sounds like you've tried to save the Gallery, with a unpersisted Product,
and Transfer is throwing a wobbly, because it doesn't know what ID to
insert.

Mark



On Thu, Feb 19, 2009 at 5:29 PM, Matthew <matthewbchamb...@gmail.com> wrote:

>
> Hi everyone
>
> I've got a pretty simple scenerio where tblA has a ManyToOne relation
> ship with tblB.
>
> How do I create a new record in tblA and update the id relating to
> tblB - I can't figure this out.
>
> See some sample code below (the error is a result of line 4)
>
> **ERROR**
> The ManyToOne TransferObject is not persisted. In TransferObject
> 'Gallery' manytoone 'Product' has not been persisted in the database.
>
> **CODE**
> objGallery = transfer.getTransfer().new("Gallery");
> objGallery.setTestField("cat");
> objGallery.setProductId(form.Id);
> transfer.getTransfer().save(objGallery);
>
> **XML**
> <object name="Gallery">
>        <id name="GalleryId" column="galleryId" type="numeric"></id>
>        <id name="TestField" column="TestField" type="string"></id>
>        <manytoone name="Product">
>                <link column="ProductId" to="Product"/>
>        </manytoone>
> </object>
>
> Cheers
> Matthew
>
> >
>


-- 
E: mark.man...@gmail.com
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 transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to