Developer does not use the servoy sequence in the repository I believe. It takes automaticly the higest possible pk. A real servoy server you can reset indeed by using the reset servoy sequence button on the servoy admin page
I know that I am able to sync the sequence, but that isn’t going to help… I have 2000 rows in my table, and the pk starts at 16000 and ends at 18123 or something. If I sync my sequence, it will just sync with the maxrow 2000something, not the max value, which is 18123…
Harjo:
Developer does not use the servoy sequence in the repository I believe. It takes automaticly the higest possible pk. A real servoy server you can reset indeed by using the reset servoy sequence button on the servoy admin page
That is how it should be.
On application server I know this is working correct, I have my doubts on correct working in developer…
bevil:
If I sync my sequence, it will just sync with the maxrow 2000something, not the max value, which is 18123…
I’ve experienced similar things in developer, although I didn’t have time to dig into the exact behaviour.
Maybe someone of Servoy can lookup in code what is happening in developer?
I have tested in both developer and server, and they both produce the same result. The next pk is 2005 or something, and I cannot override and say it needs to be 18124 anywhere that I can find…
Hope you are well and that you had a great Xmas and New Year…
I think it is behaving exactly as it is supposed to… It finds the max pk, and increments it…
The problem is that in the old days, with Sybase, in Developer, you could specify your start point for a sequence, and upload that solution to your server, which would then start the sequence at that number.
I did this because a client wanted a particular number to start at 16000 for legacy reasons.
The problem is that now, when Servoy correctly calculates that there are 2103 rows in the table, increments the pk to 2104. This is out of sync with my number which should be 18124.
I can tell Servoy (developer or server) to sync the sequences, but it then - also correctly - syncs to 2103…
I think I will solve the problem in the dirtiest way possible, by adding 15999 dummy records to the table, and then tablefilterparam them out on start…
I could also unbind my pk from the number I need to use, but I have tried to do that and there is a lot of dependency on it (I know… crappy programming, I should have used an unbound id to begin with, but I built this 5 years ago and didn’t think about it.)
if the max PK is 21008, after a reset, the next should be 21009!! despite the count of records in the database!!
Did you try to reset the sequence on a REAL application_server (with a repository and not started by developer!) ?