Everything that generateList() did and more can now be done using
either find('list') or find('all') and Set::combine(). Also, I'll be
committing a patch shortly that improves the flexibility of
find('list') in terms of field handling.
On Jan 10, 4:57 pm, lordG <[EMAIL PROTECTED]> wrote:
> Yeah,
Yeah, I agree with what your saying on the performance... yet it is a
slight inconvenience... this is what I have now cusomtised the
generateList to be in my AppModel
function generateList($conditions = null, $order = null, $limit =
null, $keyPath = null, $valuePath = null, $groupPath = n
To replace generateList I use find('all', array('fields' =>
array('id', 'name')) and then a set::combine.
I find out that using find('list', ..) with 'fields' did not work as I
expect ..(I was experimented, maybe my mistakes).
Somehow I like the new way, "generateList" was retrieving ALL FIELDS
Sorry, I meant Set::combine($foo, '.');
Was reading up on Set::extract at the time.
On Jan 10, 2008 3:43 PM, Baz <[EMAIL PROTECTED]> wrote:
> I think he's talking about it being encapsulated in find('list')as
> would be the assumption of most.
>
> With no parameters it behaves the same..
ok, cool, that could also work.
On Jan 10, 11:43 pm, Baz <[EMAIL PROTECTED]> wrote:
> I think he's talking about it being encapsulated in find('list')as would
> be the assumption of most.
>
> With no parameters it behaves the same...If you looking to pass all that
> stuff you need to make 2 c
Hey AD,
Yeah, just worked out one like that. Me being stupid! lol
This is what I have done,
function generateList($conditions = null, $order = null, $limit =
null, $keyPath = null, $valuePath = null, $groupPath = null, $page =
1, $recursive = 0)
{
//get the data
I think he's talking about it being encapsulated in find('list')as would
be the assumption of most.
With no parameters it behaves the same...If you looking to pass all that
stuff you need to make 2 calls:
$foo = $this->find('all');
$list = Set::extract($foo, '{n}.');
On Jan 10, 2008 3:31
On Jan 10, 10:26 pm, lordG <[EMAIL PROTECTED]> wrote:
> Hey Guys,
>
> One of the great features i liked about the generateList was that you
> could make a list of data that the id was the key and the data was the
> value... e.g. generateList(null, null, null, '{n}.Model.id', '{n}')
>
> Why remov
If it is possible to do the above though using the find('list'..., how
would one suggest it be done?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@goog
Hey Guys,
One of the great features i liked about the generateList was that you
could make a list of data that the id was the key and the data was the
value... e.g. generateList(null, null, null, '{n}.Model.id', '{n}')
Why remove generateList, why not just leave it and give the option of
both? B
10 matches
Mail list logo