[Dbix-class] Consistent column name aliasing?

Maddy, Noel NMADDY1 at hfhs.org
Mon Apr 2 17:14:13 GMT 2012


Thanks - looks like that'll work well for me.

With the aliases in the view_definition, all of the
relationships and searches now use reasonable names. And
I get read-only results for free.

Thanks,
Noel

> -----Original Message-----
> From: Dave Howorth [mailto:dhoworth at mrc-lmb.cam.ac.uk]
> Sent: Monday, April 02, 2012 5:59 AM
> To: dbix-class at lists.scsys.co.uk
> Subject: Re: [Dbix-class] Consistent column name aliasing?
>
> Alexander Hartmaier wrote:
> > The accessor is only used to create the object accessors, search has
> > always used the column names and not the accessor names.
>
> Using views may help:
>
>   __PACKAGE__->table('Artists');
>   __PACKAGE__->result_source_instance->is_virtual(1);
>   __PACKAGE__->result_source_instance->view_definition(...
>
> Cheers, Dave
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-
> class at lists.scsys.co.uk

CONFIDENTIALITY NOTICE: This email contains information from the sender that may be CONFIDENTIAL, LEGALLY PRIVILEGED, PROPRIETARY or otherwise protected from disclosure. This email is intended for use only by the person or entity to whom it is addressed. If you are not the intended recipient, any use, disclosure, copying, distribution, printing, or any action taken in reliance on the contents of this email, is strictly prohibited. If you received this email in error, please contact the sending party by reply email, delete the email from your computer system and shred any paper copies.

Note to Patients: There are a number of risks you should consider before using e-mail to communicate with us. See our Privacy Policy and Henry Ford My Health at www.henryford.com for more detailed information. If you do not believe that our policy gives you the privacy and security protection you need, do not send e-mail or Internet communications to us.


More information about the DBIx-Class mailing list