[Deprecated] DMZ 1.6.2 (DataMapper OverZealous Edition) |
[eluser]Conerck[/eluser]
[quote author="wandschrank" date="1266513487"] I mean this foreach-thing. Isn't there a clever way to get the authors for any serial? With this i have one SQL-statement for each serial. It works, but not very smart. Sorry for my bad english.[/quote] You can use the include_related() method for this like so. Code: $s = new Serial(); This should work, I believe. Take a look at the appropriate section in the User Guide if it doesn't. http://www.overzealous.com/dmz/pages/get...de_related EDIT: This is assuming that Serial -> Author is a has_one relationship |
Welcome Guest, Not a member yet? Register Sign In |