If you added the method in the decorator, but its saying the method does not exist, be sure you are reloading / recreating your transfer factory, and as a last resort be sure to delete all the auto-generated transfer files. Sounds like its not being re-created, because you are on the right track there with the decorator method.
Chris Peterson On 5/28/09 1:30 PM, "pedrobl" <[email protected]> wrote: > > > This surely has been asked before but, unfortunately I can't find > it... I'm developing an application with coldbox, spring and transfer. > All in their current latest versions. > > The data model is: table of Users, and a table of Orders. A user can > have many orders. So the Orders table has a userId foreign key that > relates it to the Users table. The transfer.xml configuration file is > something like: > > <package name="sp"> > <object name="User" table="users" decorator="model.decorators.User"> > <id name="userId" column="usr_id" type="numeric" generate="false" /> > <property name="Username" type="string" nullable="false" > column="usr_username" /> > </object> > <object name="Order" table="orders" > decorator="nw.model.decorators.Order"> > <id name="OrderId" column="ord_id" type="numeric" generate="false" /> > <property name="Name" type="string" nullable="false" > column="ord_name" /> > <property name="UserId" type="numeric" nullable="false" > column="ord_user_id" /> > <manytoone name="OrdUser"> > <link column="ord_user_id" to="sp.User" /> > </manytoone> > </object> > </package> > > And what I'd like to do is, when I get the list of orders using > getTransfer().list("sp.Order"), I'd like to show the Username of the > user related to each Order. What is the easiest way to accomplish > this, please? > > I've tried creating a getOrdUser method in the Order decorator, and > trying to call it from the view "order.getOrdUser().getUsername()", > but this returns an error stating that the method getOrdUser() doesn't > exist... > > Thanks in advance for your help! > > Pedro. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
