[Dbix-class] I get only one in a one to one

Juan Miguel Paredes juan.paredes at gmail.com
Tue Jan 10 12:16:29 GMT 2012


On Mon, Jan 9, 2012 at 4:39 PM, Miguel Barco <miguelelelele at yahoo.es> wrote:
> Thank you, I never would have noticed that the html comments does not affect
> to the TT/Catlayst logic.
>
> But the problem remains the same, because I want to retrieve some columns
> from the main table an some from the related one, so I was told to use
> Prefetch.
>
> What I really need is something as simple as this query (that I can use
> everywhere):
>
> SELECT books.title, contents.content_en
> FROM books, contents
> WHERE books.id = 1111
> AND contents.id = 1111

Hi, Miguel.

Have you tried using the "columns" attribute in your call to search?

http://search.cpan.org/~abraxxa/DBIx-Class-0.08195/lib/DBIx/Class/Manual/Cookbook.pod#Using_specific_columns

Regards,

Juan



More information about the DBIx-Class mailing list