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 7501713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:37:59+00:00 2026-05-29T20:37:59+00:00

When adding a relationship between two tables, I am offered the choice of adding

  • 0

When adding a relationship between two tables, I am offered the choice of adding triggers to the On-Update and On-Delete events of the foreign table. Now I understand that when the foreign table is deleted, the On-Delete event will be triggered in the local table.

An example of this is a user and profile in a one to one relationship. In Propel this offers some extra functions to make finding attached records simpler than querying using a foreign key. Now, I have the primary key set as a foreign key to the user table with an On-Delete trigger of CASCADE. This means that when I delete the user record, the profile record(s) gets removed as well.

Now, what would a cascading On-Update trigger do? When using propel I can change the profile properties without saving and then call save on the user, if I have cascading on-update set for profile, will it automatically save/update the profile information when saving a user?

The reason this is so confusing is because the tables don’t know about Propel, so there must be another reason for the On-Update and the Propel documentation only explains the use of the On-Delete trigger.

Any kind of insight relating to Propel would be greatly appreciated. Some generic definition is not what I am looking for.

  • 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-29T20:38:00+00:00Added an answer on May 29, 2026 at 8:38 pm

    Unless things have changed since 1.2 these are simply implementations (either native or emmulated) for tradidional RDBMS constraints (mysql 5.5 constraints docs). This has nothing to do with propel it has to do with databases. Thus ON UPDATE would allow you to CASCADE the updated key value – this assumes you have FK’s where the value can change. It doesnt have anything to do with other columns.

    if I have cascading on-update set for profile, will it automatically save/update the profile information when saving a user?

    It will do this even if you dont have CASCADE turned on as long as the related object is hydrated on the object you issue the save to. The ON UPDATE stuff has nothing to do with this, its the mere fact that the two carry a relationship and thus have object members in each class that allows for this. When you call save on an object, it goes through all hydrated objects and collections and saves anything that is marked as changed.

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

Sidebar

Related Questions

I have a Linq to SQL EntitySet with a Foreign Key Relationship between two
I am designing a many-to-many relationship between two models: Cell and Isolator : CREATE
I have the following three tables: Item Code ItemCode (many to many relationship between
I have a domain object which represents a 1:n relationship between database tables. public
I have a table which defines a child-parent relationship between nodes: CREATE TABLE node
I have a many-to-many relationship between two classes (Lesson and Student), with an intermediary
I have two MySQL tables A and B . Table A has a member
We implement an One-to-Many relationship by adding one Table's PK, as FK to the
What's the proper way of adding a FK relationship in rails AFTER the tables
I have two tables, say Table A and Table B. I want to have

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.