Jump to content

Is setting primary key relationships during config mandatory


This topic is 3057 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I'm new to Mirrorsync and have a question about what setting up primary key relationships does during configuration.

When setting up a new sync and matching primary keys, if I am unsure of all of the table relationships is it ok to just ignore those relationships and then add them later in Filemaker Manage Database? Does setting it up at the mirrosync config level change any scripts or anything else I should worry about if I later add relationships between tables in Filemaker?

Link to comment
Share on other sites

Hi Sterling - if you're using MirrorSync-managed keys (typically used for serial number primary keys, ie. 1, 2, 3, 4, etc) then it's very important to configure the foreign key relationships. If you don't configure them, then your foreign keys will point to the wrong records or to nothing when the parent record is synced with the other database.

If you're using Developer-managed keys (typically a UUID), then it's much less important; it's really only used to determine the sync order (we always sync parent records before children), which doesn't matter that much unless you have foreign key constraints enabled that check the validity of parent-child relationships.

There doesn't, strictly speaking, need to be a perfect match between your relationship graph and your MirrorSync configured relationships. We use the relationship graph as a data entry aid to auto-populate the MirrorSync relationships, but you could add or remove them during MS configuration.

I know you were working on WordPress syncing - is that still the case? If so, that Youtube video you were looking at shows all of the WordPress relationships.

If you do change relationships at some point in the MirrorSync configuration, it is important to re-paste the MirrorSync script steps, because we change the order of the fields we write to have foreign keys come before other field types.

Link to comment
Share on other sites

  • Newbies

Thanks for that response. You are right, this initial project is Wordpress related, and I know I got the core Wordpress stuff right based on your excellent video. It's some of the other tables that plugins have created (primarily BuddyPress and Gravity Forms, but some others as well) that I'm not exactly sure of the relationships about and the BuddyPress database schema docs in particular seems tobe out of date. I'm not having any problems so far though.

Link to comment
Share on other sites

This topic is 3057 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.