January 25, 20196 yr 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!
January 25, 20196 yr 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.
January 28, 20196 yr Author 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 😉
Create an account or sign in to comment