Re: [Dbix-class] deleting from a view

2011-07-12 Thread Darren Duncan
Peter Edwards wrote: On 6 July 2011 15:01, Dave Howorth dhowo...@mrc-lmb.cam.ac.uk wrote: I have a DBIC class made up using a UNION, something like this __PACKAGE__-result_source_instance-is_virtual(1); __PACKAGE__-result_source_instance-view_definition( SELECT

Re: [Dbix-class] deleting from a view

2011-07-07 Thread Dave Howorth
Ashley Pond V wrote: On Wed, Jul 6, 2011 at 7:01 AM, Dave Howorth dhowo...@mrc-lmb.cam.ac.uk wrote: I have a DBIC class made up using a UNION, something like this simplified example: __PACKAGE__-table('nodes'); __PACKAGE__-result_source_instance-is_virtual(1);

Re: [Dbix-class] deleting from a view

2011-07-07 Thread Dave Howorth
I wrote: That works but results in a series of SELECT followed by DELETE: SELECT me.sp_id, me.sp_status FROM sp me WHERE ( me.sp_id = ? ): '600011' DELETE FROM species WHERE ( sp_id = ? ): '600011' Just to be clear. The same pair of queries results from the following code:

[Dbix-class] deleting from a view

2011-07-06 Thread Dave Howorth
I have a DBIC class made up using a UNION, something like this simplified example: __PACKAGE__-table('nodes'); __PACKAGE__-result_source_instance-is_virtual(1); __PACKAGE__-result_source_instance-view_definition( SELECT sp_id AS id, sp_status COLLATE latin1_general_ci AS

Re: [Dbix-class] deleting from a view

2011-07-06 Thread Peter Edwards
On 6 July 2011 15:01, Dave Howorth dhowo...@mrc-lmb.cam.ac.uk wrote: I have a DBIC class made up using a UNION, something like this __PACKAGE__-result_source_instance-is_virtual(1); __PACKAGE__-result_source_instance-view_definition( SELECT sp_id AS id, ... I've discovered

Re: [Dbix-class] deleting from a view

2011-07-06 Thread Ashley Pond V
On Wed, Jul 6, 2011 at 7:01 AM, Dave Howorth dhowo...@mrc-lmb.cam.ac.uk wrote: I have a DBIC class made up using a UNION, something like this simplified example:  __PACKAGE__-table('nodes');  __PACKAGE__-result_source_instance-is_virtual(1);