Hello List,
I used to have an id INTEGER PRIMARY KEY column in every table.
Now I am using DBIC and repeatedly run into this kind of error.
SELECT me.id, me.title, me.artist FROM cds me WHERE ( me.artist = ? ): '2'
SELECT me.id, me.title, me.artist, artist.id, artist.name FROM cds me
JOIN
From: David Schmidt [EMAIL PROTECTED]
Hello List,
I used to have an id INTEGER PRIMARY KEY column in every table.
Now I am using DBIC and repeatedly run into this kind of error.
SELECT me.id, me.title, me.artist FROM cds me WHERE ( me.artist = ? ): '2'
SELECT me.id, me.title, me.artist,
On Tue, Nov 25, 2008 at 5:31 PM, Octavian Rasnita [EMAIL PROTECTED] wrote:
From: David Schmidt [EMAIL PROTECTED]
Hello List,
I used to have an id INTEGER PRIMARY KEY column in every table.
Now I am using DBIC and repeatedly run into this kind of error.
SELECT me.id, me.title, me.artist
David Schmidt wrote:
On Tue, Nov 25, 2008 at 5:31 PM, Octavian Rasnita [EMAIL PROTECTED] wrote:
From: David Schmidt [EMAIL PROTECTED]
Hello List,
I used to have an id INTEGER PRIMARY KEY column in every table.
Now I am using DBIC and repeatedly run into this kind of error.
SELECT me.id,
On Tue, Nov 25, 2008 at 9:45 AM, Peter Rabbitson [EMAIL PROTECTED] wrote:
As far as the don't repeat yourself - what do you propose? Your query
(the join-ed one) selects from two tables that have the same column.
Unless you specify which column you are interested in, it is not safe
for DBIC
On Tue, Nov 25, 2008 at 10:22 AM, Peter Rabbitson [EMAIL PROTECTED] wrote:
Noel Burton-Krahn wrote:
The problem is that DBIx has the smarts to prefix column names in
the select clause, like select me.id, cds.id but not in the where
clause where id=?.
How does DBIC know if the user meant
prefixing the id column with the name of the relationship seems much more
obvious than prefixing the base table's column with me. This doesn't seem
like it would be too complicated to implement -- if the column given is not
already prefixed by one or more table/relationship aliases, it could be
From: Noel Burton-Krahn [EMAIL PROTECTED]
This is a reasonable query: load a person with address by the
person's id. The 'id' column is unambiguous in the search call.
However, DBIx generates ambiguous SQL:
DBIx::Class::ResultSet::count(): DBI Exception: DBD::mysql::st execute
failed: Column
Octavian Rasnita wrote:
From: Noel Burton-Krahn [EMAIL PROTECTED]
This is a reasonable query: load a person with address by the
person's id. The 'id' column is unambiguous in the search call.
However, DBIx generates ambiguous SQL:
DBIx::Class::ResultSet::count(): DBI Exception:
From: Peter Rabbitson [EMAIL PROTECTED]
I think that if the query needs to search in a table named me which is
not the primary table, it probably gives another name instead of me
for the main table, so that name shouldn't need to be hard coded in the
programs.
By the way, does anyone know what
On Tue, Nov 25, 2008 at 2:06 PM, Peter Rabbitson [EMAIL PROTECTED] wrote:
Octavian Rasnita wrote:
From: Noel Burton-Krahn [EMAIL PROTECTED]
By the way, does anyone know what happends if a secondary table is named
me?
The name of the table is irrelevant as they are all aliased anyway. If
11 matches
Mail list logo