Using Servoy's record ID as a relation link?

Is it bad to use a Servoy record ID (the *_id primary key field it creates when you create a new table) as a relationship ID link to another table?

I have a sort of Order form and table, and have a separate “line items” table for keeping track of the items on the order (which is on the main Order form via a tabpanel, and the line item form it’s self is a portal to the line item data.)

At the moment I am using the Order table’s record ID as the portal relationship to the Line Items table, since there is nothing else on my Order form that is unique.

However, I’m wondering if this is a bad idea since the Servoy record IDs are can be reset in Servoy if they get screwed up, which would re-serialize all of the Order records and then mess up the link to the Line Items… correct? Should I just make my own separate ‘serial number’ type column in my Order table and use that instead?

since the Servoy record IDs are can be reset in Servoy if they get screwed up

Where did you read this?
It is true that the sequences are reset but not the id’s of existing records, unless you script this yourself…

IT2Be:
Where did you read this?
It is true that the sequences are reset but not the id’s of existing records, unless you script this yourself…

I assumed it was the IDs themselves - So what does the ‘Update Servoy sequences…’ button do in the server admin then? Just reset the ‘next sequence number’ based on the highest number it finds in the tables?

Thanks

So what does the ‘Update Servoy sequences…’ button do in the server admin then? Just reset the ‘next sequence number’ based on the highest number it finds in the tables?

Indeed that is what it does.
So, the answer to your question is that it is save to use these id’s.
BTW it would be very dangerous if Servoy would perform such operations because of the same reason why you suggested not to use these id’s.

IT2Be:
BTW it would be very dangerous if Servoy would perform such operations because of the same reason why you suggested not to use these id’s.

That’s what I was thinking too :) I was just confused on the terminology in the documentation I guess and what it really meant.

Thanks for the info, I feel a bit better now :)