[Dbix-class] PostgreSQL, new_related and belongs_to relationships

Peter Shangov pshangov at yahoo.com
Mon Apr 11 08:33:13 GMT 2011


Hi,

I get this error with both DBIx::Class 0.08127 and 0.08190.

Cheers,

--- On Fri, 8/4/11, Peter Rabbitson <rabbit+dbic at rabbit.us> wrote:

> From: Peter Rabbitson <rabbit+dbic at rabbit.us>
> Subject: Re: [Dbix-class] PostgreSQL, new_related and belongs_to relationships
> To: "Class user and developer list" <dbix-class at lists.scsys.co.uk>
> Date: Friday, 8 April, 2011, 18:50
> Peter Shangov wrote:
> > Hi, 
> > I can’t get
> $row->new_related(‘some_belongs_to_rel’, \%values) to
> work with PostgreSQL. DBIC tries to insert a new row with a
> NULL for the primary key, which works with some databases,
> but not with PostgreSQL. Here is a test file that
> demonstrates the issue (it will not fail with SQLite):
> > 
> > https://gist.github.com/909809
> > 
> > Probably this is a known issue, I just wanted to check
> if there is something I am missing …
> > 
> 
> Which version of DBIC?
> 
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
> 



More information about the DBIx-Class mailing list