Jump to content

Filemaker error from server FileMaker primary keys must not begin with a 0


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

Recommended Posts

  • Newbies

Hi everyone, i'm a newest user with MirrorSync. 

I could install MirrorSync without problems and get records in my local database, but i had a problem when i try to get records that has the first letter of primary key starts with "0", MirrorSync show the message:

"Error from server: java.sql.SQLException: FileMaker numeric primary keys must not begin with a 0. Either remove the zero padding, or switch the primary key field and all related foreign keys to text. First error: 01234567-DACC-8DE7-58DD-2ASSDE474DCA from table TableName" 

The field its auto-generate UUID of type text.

I try to find a way modified the script MirrorSync, but i dont know how to control this in the script, any solution for this? Thanks! 

Link to comment
Share on other sites

MirrorSync can handle 0 padding if you're using Developer Managed Keys and not MirrorSync Managed Keys, so for the tables that are using UUIDs, you need to change them to developer managed. The reason that the MirrorSync Managed Keys option can't handle 0s are because MirrorSync writes its internal sync data in SQL, and SQL can't handle 0 padding for primary keys. If you're using UUIDs, you should be using developer managed.

If you have multiple tables where some of them use serial numbers and some use UUIDs you need to change the Table Configuration Options when configuring the sync. You'll see a check box that says "Same settings for all tables." If you're have tables that use either serial keys or UUIDs, you will want to uncheck that and specify which table needs developer managed and which ones need MirrorSync managed.

  • Like 1
Link to comment
Share on other sites

  • Newbies
On 1/25/2019 at 5:06 PM, ryan360Works said:

MirrorSync can handle 0 padding if you're using Developer Managed Keys and not MirrorSync Managed Keys, so for the tables that are using UUIDs, you need to change them to developer managed. The reason that the MirrorSync Managed Keys option can't handle 0s are because MirrorSync writes its internal sync data in SQL, and SQL can't handle 0 padding for primary keys. If you're using UUIDs, you should be using developer managed.

If you have multiple tables where some of them use serial numbers and some use UUIDs you need to change the Table Configuration Options when configuring the sync. You'll see a check box that says "Same settings for all tables." If you're have tables that use either serial keys or UUIDs, you will want to uncheck that and specify which table needs developer managed and which ones need MirrorSync managed.

Thanks! I will try it again 😉

Link to comment
Share on other sites

This topic is 1887 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.