[CDBI] How do you get the raw db value of a column rather than inflated object

Peter Speltz peterspeltz at gmail.com
Sat Feb 11 22:44:01 GMT 2006


On 2/11/06, Peter Speltz <peterspeltz at gmail.com> wrote:
> On 2/11/06, Bill Moseley <moseley at hank.org> wrote:
> > On Sat, Feb 11, 2006 at 06:57:32AM -0600, Peter Speltz wrote:
> >
> >   $object->my_column->id
>
>
> Problem with that is you have to know you are dealing with an inflated
> column and also a CDBI object in order to accurately get at the raw
> value.   Has_a s can be inflated to any object.  I could call deflate
> explicitly but it is not documented how to do that and  I cant remeber

I rememebered and reread the docs. Deflation is documented better than
i lead on. If you dont explicitly set the deflate method the docs say
it will  deflate by stringifying.  Although i think if it is a CDBI
object it must deflate by calling 'obj->id' because otherwise my stuff
would not work as I override strinfify often.

So  i guess it is not too big a problem now anymore.

cheers,

pjs




More information about the ClassDBI mailing list