Monday, August 30, 2010

Re: is it possible to define "empty" virtual fields?

On Sun, Aug 29, 2010 at 9:22 PM, Greg Skerman <gskerman@gmail.com> wrote:
> Hi,
>
> Wondering if its possible to define virtual fields without actually defining
> what the virtual field points at?

So, it would be assigned to everything and nothing?

> I want to do this later on in my query via a join, but need to define the
> virtual field so that pagination will work as expected.

How could it "work as expected" if both everything and nothing are
expected of the virtual field?

I suppose you could try defining it as the empty string, then
assigning something later to it.

$this->virtualFields['foo'] = 'bar';

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: