Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6816277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:54:23+00:00 2026-05-26T20:54:23+00:00

I am working on a CakePHP application at the moment and I am writing

  • 0

I am working on a CakePHP application at the moment and I am writing a few validation rules for one of the models.

I have a feeling I am making too many checks to the database at the moment and want to get a view on this.

For example I am saving to a model which has a lot of associated models as such I am saving 5 different foreign id’s per save operation. To ensure that all of the id’s are correct I have a validation rule for each which checks that in fact the ID does exist in the correct table in the database.

There are also a few other validation rules, but without going in to too much detail I think I am hitting the database around 10 times for one save operation, to ensure that all of the data is valid.

Is there any sort of limit I should be applying, or is the overhead fairly minimal?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:54:24+00:00Added an answer on May 26, 2026 at 8:54 pm

    Premature optimization is the root of all evil.

    Get your app rolled out. Once real people use it for real purposes, you can do benchmarks to see where you really need to optimize.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

let's say i have: http://some-domain/application/controller/action/parameter This is somehow working in cakePHP. Now I want
I have uploaded a working Cakephp web application to Mosso Cloud Sites hosting. The
I have 2 basic models in my CakePHP application: User and Login. A user
I have one domain on godaddy (www.mydomain.com). I have placed my cakephp application on
I am working on development of an application using CakePHP framework. We all have
Working on a project at the moment and we have to implement soft deletion
I am new to cakephp and have been working through the Apress book Beginning
I am working on CakePHP, and I have my app working in my localhost.
I have a RESTful API set up and working with CakePHP using mapResources() and
My problem is that memcache logic inside my cakePHP application is not working on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.