Re: [Dbix-class] RecursiveUpdate and many to many

2008-09-30 Thread Matt S Trout
On Tue, Sep 30, 2008 at 02:28:47PM +0100, Pedro Melo wrote: > >In DBIx::Class terms, that's not how we model it. > > I know and understand that, but from the outside, can you understand > that given that many_to_many is discussed in > DBIx::Class::Relationships its only natural to people arriv

Re: [Dbix-class] RecursiveUpdate and many to many

2008-09-30 Thread Matt S Trout
On Tue, Sep 30, 2008 at 02:36:51PM +0200, Moritz Onken wrote: > > Am 29.09.2008 um 17:50 schrieb Matt S Trout: > > >On Sun, Sep 28, 2008 at 05:56:11PM +0100, Oliver Gorwits wrote: > >>Ideally, DBIC would instead populate the relationship_info details > >>after someone has set up __PACKAGE__->many

Re: [Dbix-class] Re: DBIx::Class::ResultSet::RecursiveUpdate - announcement and RFC

2008-09-30 Thread Matt S Trout
On Tue, Sep 30, 2008 at 02:39:00PM +0200, Zbigniew Lukasiak wrote: > On Tue, Sep 30, 2008 at 2:20 PM, Matt S Trout <[EMAIL PROTECTED]> wrote: > > On Tue, Sep 30, 2008 at 09:28:50AM +0200, Zbigniew Lukasiak wrote: > >> The tricky part is when you load data from the form into the new row. > >> You ne

[Dbix-class] RT #21260: Problem with last_insert_rowid and DBD::ODBC

2008-09-30 Thread Marc Mims
[CC-ed to the list in case mst or others care to weigh in.] Eriam, I was perusing RT and saw your bug report: http://rt.cpan.org/Public/Bug/Display.html?id=21260 Storage::DBI::ODBC attempts to determine the backend database type and reblesses to an appropriate class if one exists. If it cannot

Re: [Dbix-class] Can people please poke trunk

2008-09-30 Thread Matt S Trout
On Mon, Sep 29, 2008 at 07:01:49PM +0200, Zbigniew Lukasiak wrote: > On Mon, Sep 29, 2008 at 6:49 PM, Matt S Trout <[EMAIL PROTECTED]> wrote: > > > Ah. it appears I've cocked up has_manys. > > > > Could you re-send the test patch please? > > Here it is. Thanks. Fixed now. -- Matt S Trout

Re: [Dbix-class] Re: DBIx::Class::ResultSet::RecursiveUpdate - announcement and RFC

2008-09-30 Thread Oliver Gorwits
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zbigniew Lukasiak wrote: > For the time being the convention with special treatment for {pk > => undef} is the only way that I can implement something covering > all the possible cases. I think that "special treatment" should set off alarm bells in yo

Re: [Dbix-class] Re: DBIx::Class::ResultSet::RecursiveUpdate - announcement and RFC

2008-09-30 Thread Zbigniew Lukasiak
OK - so here is an improved reply. On Tue, Sep 30, 2008 at 2:39 PM, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: > On Tue, Sep 30, 2008 at 2:20 PM, Matt S Trout <[EMAIL PROTECTED]> wrote: >> On Tue, Sep 30, 2008 at 09:28:50AM +0200, Zbigniew Lukasiak wrote: >>> The tricky part is when you load dat

Re: [Dbix-class] $schema->ddl_filename() will potentially corrupt the directory name

2008-09-30 Thread Jess Robinson
On Thu, 25 Sep 2008, Byron Young wrote: If you pass a $preversion to ddl_filename(), it will update the filename with s/$version/$pversion-$version/ after it constructs the full filename. If your $dir happens to have something in it that matches $version, the directory will be corrupted an

[Dbix-class] might_have cascade_* documentation clarification [patch]

2008-09-30 Thread Adam Sjøgren
Here is a tiny patch for the might_have documentation, to add mention of the cascade_update attribute. The current wording sounds like you can turn off update cascading by setting the cascade_delete attribute, which I don't think reflects the code, when I quickly glance at DBIx::Class::Relationshi

[Dbix-class] RFC: InflateColumn::FS

2008-09-30 Thread Marc Mims
I recently watched Matt's lightning talk: http://yapc.tv/2008/ye/lt/lt1-12-trout-arent-good-enough/ I've got some code I haven't shared with the world, yet, so perhaps it's time. It probably has bugs. :-) So, for your comments, here's DBIx::Class::InflateColumn::FS. (Please suggest a better nam

[Dbix-class] Catalyst, DBIx::Class and Moose training in the UK

2008-09-30 Thread Matt S Trout
Shadowcat are looking to start offering training in Catalyst, DBIx::Class and Moose usage, both introductory sessions and more advanced workshop-style classes. The intended format would be two-day classes on site in Lancaster (we'll either arrange accommodation or people can organise their own if t

Re: [Dbix-class] RecursiveUpdate and many to many

2008-09-30 Thread Pedro Melo
Hi, On Sep 30, 2008, at 1:25 PM, Matt S Trout wrote: On Mon, Sep 29, 2008 at 05:39:25PM +0100, Pedro Melo wrote: On Sep 29, 2008, at 4:50 PM, Matt S Trout wrote: On Sun, Sep 28, 2008 at 05:56:11PM +0100, Oliver Gorwits wrote: Ideally, DBIC would instead populate the relationship_info details

Re: [Dbix-class] Re: DBIx::Class::ResultSet::RecursiveUpdate - announcement and RFC

2008-09-30 Thread Zbigniew Lukasiak
On Tue, Sep 30, 2008 at 2:20 PM, Matt S Trout <[EMAIL PROTECTED]> wrote: > On Tue, Sep 30, 2008 at 09:28:50AM +0200, Zbigniew Lukasiak wrote: >> The tricky part is when you load data from the form into the new row. >> You need to delete the pk from it - because otherwise at >> update_or_insert time

Re: [Dbix-class] RecursiveUpdate and many to many

2008-09-30 Thread Moritz Onken
Am 29.09.2008 um 17:50 schrieb Matt S Trout: On Sun, Sep 28, 2008 at 05:56:11PM +0100, Oliver Gorwits wrote: Ideally, DBIC would instead populate the relationship_info details after someone has set up __PACKAGE__->many_to_many(...). That would avoid this guesswork. Why is there no ->is_many_

Re: [Dbix-class] RecursiveUpdate and many to many

2008-09-30 Thread Matt S Trout
On Mon, Sep 29, 2008 at 05:39:25PM +0100, Pedro Melo wrote: > Hi, > > On Sep 29, 2008, at 4:50 PM, Matt S Trout wrote: > > >On Sun, Sep 28, 2008 at 05:56:11PM +0100, Oliver Gorwits wrote: > >>Ideally, DBIC would instead populate the relationship_info details > >>after someone has set up __PACKAGE

Re: [Dbix-class] Re: DBIx::Class::ResultSet::RecursiveUpdate - announcement and RFC

2008-09-30 Thread Matt S Trout
On Tue, Sep 30, 2008 at 09:28:50AM +0200, Zbigniew Lukasiak wrote: > The tricky part is when you load data from the form into the new row. > You need to delete the pk from it - because otherwise at > update_or_insert time it would issue an insert with pk = NULL - and > this will fail in Pg (for exa

Re: [Dbix-class] Re: DBIx::Class::ResultSet::RecursiveUpdate - announcement and RFC

2008-09-30 Thread Zbigniew Lukasiak
On Mon, Sep 29, 2008 at 11:40 PM, Oliver Gorwits <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > Zbigniew Lukasiak wrote: >> It works only with primary keys. And if you supply 'undef' in >> the place of the auto_increment PK then it knows that this will >> be a