Thanks for clarifying that for me, Ezra. :) Paul
On Thu, Feb 19, 2009 at 3:49 PM, Matthew <matthewbchamb...@gmail.com> wrote: > > @Ezra: that makes complete sense. I solved it this morning as per my > last reply. Thanks for confirming. > > Cheers > Matthew > > On Feb 20, 10:31 am, Ezra Parker <ezrapar...@gmail.com> wrote: > > Hi Matthew, > > > > I think you misunderstood Paul's reply. You do not have to create a > > decorator to use the first approach he listed: > > > > > objGallery = transfer.getTransfer().new("Gallery"); > > > objProduct = transfer.getTransfer().get("Product",form.Id); > > > objGallery.setTestField("cat"); > > > objGallery.setProduct(objProduct); > > > transfer.getTransfer().save(objGallery); > > > > Transfer will generate the setProduct() method for the Product > > ManyToOne composition, and you can just call it on the Gallery object. > > You do need to pass it a Product object as its argument, however, not > > the ProductId key. If you instead wanted to use a setProductId() > > method, then *that* would require that you use a decorator for your > > Gallery object so you could add the method yourself. > > > > Does that make sense? > > > > -- > > Ezra Parker > > > -- Paul Marcotte Fancy Bread - in the heart or in the head? http://www.fancybread.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 -~----------~----~----~----~------~----~------~--~---