[osflash] [announcement] CakeAMFPHP 0.6.0 released

Marcelo de Moraes Serpa celoserpa at gmail.com
Mon Oct 23 14:12:13 EDT 2006


Just to add to my last msg:

The main reason that I kept on trying to use recordset was becouse of the
pagination features built-in on the recordset class (the on-demand,
fetch-all etc).

On 10/23/06, Marcelo de Moraes Serpa <celoserpa at gmail.com> wrote:
>
> >This is one of the reasons I avoid returning recordsets from CakeAMFPHP,
> the
> >other is because the DBConnection stuff makes the code specific to the
> remoting
> >interface. Just returning the cake array structures allows you to keep
> the same
> >code for both html and remoting sections.
>
> Thanks for clarifying this, Martin. I also had this fog about which
> technique to use. The recordset way would also make it harder to implement
> your typemapper, I think.
>
>  I guess gwoo used the recordset technique on the cakeamfbb sample?
>
> Sorry if I'm missing something, but what does Arrayf stands for?
>
> Marcelo.
>
> On 10/23/06, Martin Wood-Mitrovski <flashdev at relivethefuture.com> wrote:
> >
> >
> >
> > Marco Madarco wrote:
> > > Really good job guys! AMF + cake Model&Scaffolding is a dream.
> > > I've only a question:
> > > I started using cakeAMFPHP 0.6 (& cake 1.1.8.3544) some days ago and
> > > I'm having problem returning query results. After poking around the
> > code
> > > for a while, it seems that CakeMySqlAdapter.php return only the
> > results
> > > from last query, so it doesn't work if the model has some $has*
> > > relationships. I'm missing something?
> > > For now I've solved the problem returning an Arrayf.
> >
> > No, youre not missing anything.
> >
> > If you return a recordset then you wont get the right results if you are
> > using
> > associative models and/or setting $model->recursive.
> >
> > This is because the cake code performs a number of sql queries for one
> > model
> > method and then does an array_merge with the results. So when you follow
> > the
> > recordset technique of getting the response from the DBConnection it
> > just
> > returns the results of the last query in the set, which is often empty.
> > As you
> > found out using Arrayf is the best way to go.
> >
> > This is one of the reasons I avoid returning recordsets from CakeAMFPHP,
> > the
> > other is because the DBConnection stuff makes the code specific to the
> > remoting
> > interface. Just returning the cake array structures allows you to keep
> > the same
> > code for both html and remoting sections.
> >
> >
> > martin.
> >
> > _______________________________________________
> > osflash mailing list
> > osflash at osflash.org
> > http://osflash.org/mailman/listinfo/osflash_osflash.org
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20061023/1d2b60d2/attachment-0001.htm


More information about the osflash mailing list