2007. 11. 28, szerda keltezéssel 10.52-kor Gunnar Lium ezt írta: > > On 28/11/2007, Zoltán Németh <[EMAIL PROTECTED]> wrote: > > 2007. 11. 28, szerda keltez�ssel 01.18-kor Cacho ezt �rta: > > On 26 nov, 12:21, Jon Busby <[EMAIL PROTECTED]> wrote: > > > Are you only attempting to retrieve on picture per product > or all the pictures? > > > > > > Propel should have automatically generated the > $project->getPictures(); method, which will retrieve an array > of picture objects based on the project in question. > > > > > > > > > Hi > > > > No, its not true. > > > > Propel do a getUser() in my product class because a product > has a > > user_id. But my product has not an id for a picture. > > > > Pictures is a table that has an id and a product_id, but > product table > > know nothing about picturres so I�ve not a method in my > product, this > > is my problem. > > if pictures has a column called product_id and it is a foreign > key > referencing the products table, then the product object should > have a > method called getPictures() > > propel generates it > > if you don't have any, then something went wrong with your > model > generation... > > If the table is called pictures, the generated method will be called > getPicturess() - ie. with to s's at the end. The generator assumes > that all tables use a non-plural name, and adds an 's' to the methods. > Thus table "picture" => getPictures() and table "pictures" => > getPicturess().
true, I forgot that greets Zoltán Németh > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" 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/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
