[Dbix-class] RFC: DBIx::Class::TypedView (or Is this CPAN worthy?)

Matt S Trout dbix-class at trout.me.uk
Sat Dec 2 15:52:27 GMT 2006


On 2 Dec 2006, at 15:28, Nilson Santos Figueiredo Junior wrote:

> On 12/2/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
>> First thing: inflating to different classes based on a column
>
> Actually, when selecting it doesn't really inflate to the different
> classes. In the table A, table B, view V example above, when selecting
> you'd get V objects, not A or B objects.
>

Right, then what we definitely want is a smarter ResultSource object  
- one that produces the appropriate union select when ->from is  
called, and can redirect insert/update requests appropriately. the  
problem, as I say, is that currently the ResultSet passes the source  
straight through to storage whereas what we really need is to be  
passing the request to the source first so it can indirect through  
sources for tables A and B as appropriate.

Might be worth having a look at John's bytea-related branch and  
seeing how much trouble it'd be to do this - then it could be  
completely transparent to the class itself ...

-- 
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for  
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for  
details.
+ Help us build a better perl ORM: http://dbix- 
class.shadowcatsystems.co.uk/ +





More information about the Dbix-class mailing list