Re: [Dbix-class] as_query() and DBIx::Class::Cursor::Cached aren't friends

2009-06-08 Thread Peter Rabbitson
Rob Kinyon wrote: On Sun, Jun 7, 2009 at 20:36, Peter Rabbitson rabbit+d...@rabbit.us wrote: The fix should be quite simple, i.e. move as_query out of the Cursor class. But first I'd like someone to comment on why it ended up there in the first place. The only thing that has a query is the

RE: [Dbix-class] MySql distinct count fix

2009-06-08 Thread Anthony Gladdish
Hi Peter, -Original Message- From: Peter Rabbitson [mailto:rabbit+d...@rabbit.us] Sent: 07 June 2009 22:22 To: DBIx::Class user and developer list Subject: [Dbix-class] MySql distinct count fix Anthony Gladdish wrote: Hi, Using DBIC v0.08102_07. My Result class relationships: 1.

[Dbix-class] Deflation of objects in search conditions

2009-06-08 Thread Peter Rabbitson
We are now as close as ever to be able to do this cleanly, but I have stumbled upon a tricky problem. Please see this commit for my thoughts. The comment is in Storage::DBI::_select_args() http://dev.catalyst.perl.org/svnweb/bast/revision/?rev=6545 Ideas?

Re: [Dbix-class] create() with has_one related object broken

2009-06-08 Thread Peter Rabbitson
Hermida, Leandro wrote: Hello, Following the documentation it seems like create() with a has_one related object is broken in 0.08103? I have in MyDB::Study.pm __PACKAGE__-load_components(qw( PK::Auto Core )); __PACKAGE__-table('study'); __PACKAGE__-add_columns('id'

Re: [Dbix-class] as_query() and DBIx::Class::Cursor::Cached aren't friends

2009-06-08 Thread Rob Kinyon
If it passes all the tests, that's fine. But, the cursor knows more than the resultset because the resultset isn't a query - it's a set of potential conditions that could become an UPDATE, DELETE, or SELECT. Rob On Mon, Jun 8, 2009 at 05:39, Peter Rabbitson rabbit+d...@rabbit.us wrote: Rob

Re: [Dbix-class] A DBIC based library

2009-06-08 Thread Iain
On Sat, 2009-06-06 at 11:27 +0200, Zbigniew Lukasiak wrote: Hi, I am trying to figure out how to package a DBIC Result as a library. You can find more background in my blog post: http://perlalchemy.blogspot.com/2009/06/packaging-cross-cutting-catalyst.html . What I tried is simply

Re: [Dbix-class] Problems with DBIx:: and SQL JOIN's

2009-06-08 Thread Peter Rabbitson
Tommy Butler wrote: Friends, I'm having serious pains getting DBIx::Class to JOIN on anything. I'm dealing with one situation in particular, but my problems are not limited to this. I'd like to learn how to fix this one problem so I can go on to fix others. In the description of my

Re: [Dbix-class] possible bug in DBIx::Class::Row

2009-06-08 Thread Peter Rabbitson
Oleg Pronin wrote: in DBIx::Class::Row::insert if(!$self-{_rel_in_storage}) { #heavy code } #insert code Example: $obj1 = $rs-new({...}); $obj2 = $obj1-new_related('abc', {..}); $obj1-insert; #ok #this cause 'heavy code' to execute because $self-{_rel_in_storage} is

Re: [Dbix-class] DateTime Inflations for Timestamps

2009-06-08 Thread Peter Rabbitson
Ryan Cone wrote: Can anyone provide some insight into why timestamps are treated as datetimes in DBIx::Class::InflateColumn::DateTime? Line 63:$type = 'datetime' if ($type =~ /^timestamp/); I am using DBIC with Oracle and I am trying to distinguish between columns that are Date and

Re: [Dbix-class] create() with has_one related object broken

2009-06-08 Thread Peter Rabbitson
Hermida, Leandro wrote: Hello, Following the documentation it seems like create() with a has_one related object is broken in 0.08103? I have in MyDB::Study.pm __PACKAGE__-load_components(qw( PK::Auto Core )); __PACKAGE__-table('study'); __PACKAGE__-add_columns('id'

RE: [Dbix-class] MSSQL/Page/Prefetch problem

2009-06-08 Thread Alan Humphrey
This has been fixed in trunk. Please try and report any problems. http://dev.catalyst.perl.org/repos/bast/DBIx-Class/0.08/trunk/ Getting the same results, see below. Also, getting a failure to install DateTime::Format::Pg: [MSG] Extracted 'DateTime::Format::Pg' to

Re: [Dbix-class] DateTime Inflations for Timestamps

2009-06-08 Thread Ryan Cone
On Jun 8, 2009, at 1:47 PM, Peter Rabbitson wrote: Ryan Cone wrote: Can anyone provide some insight into why timestamps are treated as datetimes in DBIx::Class::InflateColumn::DateTime? Line 63:$type = 'datetime' if ($type =~ /^timestamp/); I am using DBIC with Oracle and I am trying to

Re: [Dbix-class] Resultset relation accessors

2009-06-08 Thread Matt S Trout
On Tue, May 26, 2009 at 01:49:05PM -0700, David Ihnen wrote: Sometimes I think i'm missing something obvious. In my application, for instance, a holiday can be assigned to a group. A group has many donors A donor might have many scheduled days A scheduled day is associated with a

Re: [Dbix-class] lazy loading of column data

2009-06-08 Thread Matt S Trout
On Tue, Jun 02, 2009 at 05:18:56PM +0200, Hermida, Leandro wrote: Hello, I looked through the DBIC list archives and on the web, cannot find anything recent or in the documentation about marking certain columns for lazy loading of their data (i.e. only right when accessor on particular

Re: [Dbix-class] as_query() and DBIx::Class::Cursor::Cached aren't friends

2009-06-08 Thread Matt S Trout
On Sun, Jun 07, 2009 at 09:09:28PM -0400, Rob Kinyon wrote: On Sun, Jun 7, 2009 at 20:36, Peter Rabbitson rabbit+d...@rabbit.us wrote: The fix should be quite simple, i.e. move as_query out of the Cursor class. But first I'd like someone to comment on why it ended up there in the first

Re: [Dbix-class] Resultset relation accessors

2009-06-08 Thread David Ihnen
Matt S Trout wrote: On Tue, May 26, 2009 at 01:49:05PM -0700, David Ihnen wrote: Sometimes I think i'm missing something obvious. In my application, for instance, a holiday can be assigned to a group. A group has many donors A donor might have many scheduled days A scheduled day is

Re: [Dbix-class] Deflation of objects in search conditions

2009-06-08 Thread Matt S Trout
On Mon, Jun 08, 2009 at 01:20:31PM +0200, Peter Rabbitson wrote: We are now as close as ever to be able to do this cleanly, but I have stumbled upon a tricky problem. Please see this commit for my thoughts. The comment is in Storage::DBI::_select_args()

[Dbix-class] Inflation and Deflation

2009-06-08 Thread Jose Luis Martinez
Hi, I've uploaded DBIx-Class-Inflator-Serializers to CPAN (http://search.cpan.org/~jlmartin/DBIx-Class-Inflator-Serializers-0.01/). I had to write a JSON inflator/deflator for a project, and thought that it would be nice to have the inflators pre-packaged. The intention is to provide a

Re: [Dbix-class] regression introduced in DBIC r5298.. Or we're Doing It Wrong..

2009-06-08 Thread Toby Corkindale
Matt S Trout wrote: On Wed, Jun 03, 2009 at 06:14:13PM +1000, Toby Corkindale wrote: Hi guys, I've encountered a regression in DBIC, introduced in revision 5298. It's more than likely that the way things were being done in the code here were not correct and *shouldn't* have worked previously,