[Dbix-class] Re: Adding a column to a result set

James R. Leu jleu at mindspring.com
Tue Jun 26 16:51:45 GMT 2007


I know its poor form to respond to your own post, but since I've not seen
a response, I just want to make sure I'm not missing something.  Can the
answer to my question be found someplace obvious?  Am I trying to do
something that is considered absurd or pointless?  Or is what I'm trying
to do just not possible.

Thanks

On Mon, Jun 25, 2007 at 07:19:52PM +0000, James R. Leu wrote:
> I'm using DBIx::Class with Catalyst.  I have implemented a Model that
> acts as an aggregator for multiple Models based on the same
> DBIx::Class::Schema.  Each query to the Model is executed on all
> of the children Models, and a new resultset that represents the data
> from all of them is returned.  I would like to add a new column to that
> resultset indicating which child Model, that row cam from.
> 
> Is there an easy way to add new column to each row of a resultset for
> which I assign the data?
> 
> I was thinking of using Class::Accessor to just add another mutator to each
> DBIx::Class, and then set the data as it passes through my Model,
> but this seems 'hackish' ... not like my approach so far isn't but this
> seems even more so, plus it's crossing the lines of adding 'Model' logic
> to the DBIx::Class.
> 
> -- 
> James R. Leu
> jleu at mindspring.com

-- 
James R. Leu
jleu at mindspring.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070626/788aa976/attachment.pgp


More information about the Dbix-class mailing list