You have to search for "me.sessionid" instead of "sessionid" when you  
do the search. If there are multiple tables involves, each has to be  
prefixes with its alias -- that's just how SQL works. Some databases  
let you get away with not doing it in some circumstances, but  
obviously this is not one of them. :-)

Dave

On Jun 24, 2006, at 9:45 PM, Tim Watson wrote:

>>>
> __PACKAGE__->belongs_to(username => 'Db::Schema::User');
>
> so try "username" since that's the name of the relationship.
> <<
>
> Thats what I had in my original question.. It gives a mysql error...
>
> SELECT me.sessionid, me.username, username.username, username.password
> FROM session me  JOIN user username ON ( username.username =
> me.username ) WHERE ( sessionid = ? )' (`123456')
>
> The sessionid in the where clause is not attributed to any table...
>
> Thanks for all the replies though.. This is a very cool module.

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to