Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

added multi-model fieldList support for Model::saveAll #266

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants
Contributor

phishy commented Oct 19, 2011

From the better-too-late-than never department, you can now use fieldList for saveAll as such:

$fieldList = array('Person' => array('first_name', 'last_name'), 'Profile' => array('rank' => 'Awesome'));

Owner

lorenzo commented Oct 19, 2011

I really like this change. Too bad 1.3 is not open anymore for enhancements. Can you consider submitting this patch for 2.0?

Contributor

phishy commented Oct 19, 2011

Were not using 2.0 at this time with 30 apps written in 1.3. Do as you will.

Sent from my iPhone

On Oct 19, 2011, at 6:35 PM, "José Lorenzo Rodríguez"
reply@reply.github.com
wrote:

I really like this change. Too bad 1.3 is not open anymore for enhancements. Can you consider submitting this patch for 2.0?

Reply to this email directly or view it on GitHub:
#266 (comment)

Owner

lorenzo commented Oct 19, 2011

That is a lot of apps, hopefully you'll find the time to migrate them! I've
heard the migration process is simple :)

Will try to rebase your patch to see if I get any luck... Thanks again for
you contribution.

2011/10/19 Jeff Loiselle <
reply@reply.github.com>

Were not using 2.0 at this time with 30 apps written in 1.3. Do as you
will.

Sent from my iPhone

On Oct 19, 2011, at 6:35 PM, "Jos Lorenzo Rodrguez"
reply@reply.github.com
wrote:

I really like this change. Too bad 1.3 is not open anymore for
enhancements. Can you consider submitting this patch for 2.0?

Reply to this email directly or view it on GitHub:
#266 (comment)

Reply to this email directly or view it on GitHub:
#266 (comment)

Contributor

phishy commented Oct 20, 2011

The more I think about this, this fixes a bug, more than acting as an enhancement. Currently if you provide a fieldList at all, none of the associated models will save, thus breaking saveAll. Why have fieldList as an enhancement, if it behaves counter to the method? I think you should merge this into 1.3 for the sake of everyone. This is a bugfix.

Owner

lorenzo commented Oct 20, 2011

I see your point, let me discuss it with the rest of the team this evening. It could even be considered as a security fix, as that is one of the purposes for $whitelist

Contributor

0x20h commented Oct 27, 2011

+1 for this bugfix :-)

Contributor

phishy commented Feb 5, 2012

I finally switched to CakePHP 2.x. I can probably port this now if anyone cares anymore. I had a one-time use for this.. it's good for advanced/conditional validation...

Owner

lorenzo commented Feb 5, 2012

I think it was added to 2.1 already. I will check that out

Member

jippi commented Feb 12, 2012

dont think it was lorenzo =) havent been able to find it in my last checkout

Owner

lorenzo commented Feb 12, 2012

I think it is lack of documentation, but I will make sure it was implemented before 2.1 is out

Owner

lorenzo commented Feb 12, 2012

Yes, it was implemented ba27c8c

@markstory markstory closed this Mar 4, 2012

Owner

markstory commented Mar 4, 2012

Closing as this made it into 2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment