[Dbix-class] Related row creation blows when there is no back relation (with a patch)

2008-11-26 Thread Zbigniew Lukasiak
Now - this is rather pathological example - but if you have a belongs_to relation and no has_many relation from the other side then related object creation blows. Here is the verbatim test I wrote for it (against the DBICTest schema, Bookmark has a belongs_to relation, Link has no defined

[Dbix-class] Parameter ordering in exceptions

2008-11-26 Thread Ovid
Routinely I get error messages like this: DBIx::Class::Row::insert(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry \'05a18ab65b354b2c4112de48f45419bf\' for key 1 [for Statement INSERT INTO identifier (authority, created, entity_pid, identifier_id, modified, type, value) VALUES

Re: [Dbix-class] Parameter ordering in exceptions

2008-11-26 Thread Nigel Metheringham
On 26 Nov 2008, at 15:56, Ovid wrote: I've given up looking for the code which does this, otherwise I'd submit a patch. It appears to be in DBI, so its a case of whether Tim would be interested in a patch for that (or catching and refiring the exception, which appears prone to do

Re: [Dbix-class] Parameter ordering in exceptions

2008-11-26 Thread Ovid
- Original Message It appears to be in DBI, so its a case of whether Tim would be interested in a patch for that (or catching and refiring the exception, which appears prone to do something unexpected later). In retrospect, that's so obvious that I'm embarrassed that I sent

Re: [Dbix-class] Parameter ordering in exceptions

2008-11-26 Thread Nigel Metheringham
On 26 Nov 2008, at 16:33, Ovid wrote: - Original Message It appears to be in DBI, so its a case of whether Tim would be interested in a patch for that (or catching and refiring the exception, which appears prone to do something unexpected later). In retrospect, that's so