Auto enter values / sequence settings

Hello,

is there a way to update a server’s auto enter option upon import WITHOUT touching the sequence settings?

I develop with DB identity, but usually deploy with Servoy sequence. I wonder how it is possible to make sure the deployed version always has the right auto enter values without overriding the Servoy sequence setting with DB identity.

Thanks
Patrick

Anyone?

Patrick, you have made a suggestion for the Analyzer for this as well.

I see the ‘big’ picture but not the details (according to all tests I have done this is part of my personality so don’t hold it against me :) ).

Can you send me an email describing how you see this.

Thx

Actually I believe this should be handled by Servoy when doing repository updates. I think it is a bit strange that sequence settings and auto enter values are somehow put in the same bag. The more I think about this the more I believe that there is no situation where I do not want to update auto enter settings. The handling of sequence types is a completely different story.

If Servoy thinks the choice to update auto enter values is important, that’s fine with me. But it should be seperated from the possibility of overriding sequence settings.

I still don’t know how I can import a solution keeping all auto enter settings but letting all sequence settings fall back to Servoy sequence. I either have to go through 250 tables in Servoy or the database.

I am still struggling with this. I guess most people use Servoy sequence or the same sequence type for all deployments. But if you don’t do that, you have my problem, I think.

I really think there should be two options for solution import:

  1. Override sequence types
  2. Override auto enter values

Or drop option 2 and override auto enters by default, because I can’t really see why I would not want to override an auto enter value (apart from sequences).

Hi Patrick,

I’m trying to import a repository right now and I use database sequences in PostgreSQL. I have just got the dreaded and confusing ‘Update Sequences’ dialog box in Servoy.

Do you wish to update the existing auto enter types?

I’m happy with my db sequences – I do not want to change anything, the databases are live and in use.

Do I understand correctly that if choose ‘No’, my 100+ tables will revert to Servoy sequences?

Yes. As far as I understand that…

Answering ‘No’ is not an option, it will take me about a day to get the sequences back in order.

What happens if you say ‘Yes’?

Is this just a badly worded dialog box…

Hi,

I clicked ‘Yes’. Then I got

com.servoy.j2db.persistence.RepositoryException: com.servoy.j2db.persistence.RepositoryException: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(50)

Which probably means Servoy is trying to make up some sequence names, and they end up longer than the field in the repository database can hold

I now remember I have in the past searched the repository database manually to try and locate the offending data without any luck.

Servoy is modifying something during the import and tripping itself up

:frowning:

Hi all,

just wanted to say that the Jan Block at Servoy responded immediately to my problem and found the reason why my solution wasn’t importing.

Fantastic!

So, Christian, could you share? Why was the solution not importing? How did you end up resolving the PK issue?

thanks,

kazar

Yes, please comment on the resolution to this issue - I have the same concerns as Patrick as our methodology is similar.

At the end of the day I want (need :-)) to be able to keep sequences “as they are and managed by Servoy” but update other Autoenter settings (i.e. - non-sequence related settings).

We have switched from db managed to Servoy managed as we felt the long term benefit overall would be with Servoy managed sequences. Quite a departure for me as I have always used db managed sequences!

Appreciate any final resolutions, methods etc on this topic area.

Michael

Yes! There should be two checkboxes:

  1. Update auto enter values
  2. Use Sequence settings from import file (if not, Servoy sequence will be used)

And in my opinion, option 1 is useless. In what occasions should I not want auto enter values to be the way I set them?

kazar:
So, Christian, could you share? Why was the solution not importing? How did you end up resolving the PK issue?

thanks,

kazar

Hi, the issue I was having was a little peculiar.

If you import a solution, and the database is empty, i.e. Servoy has to build the tables, and you have used DB sequences for your primary keys…

…Servoy thinks it is not capable of defining the sequences, so it just guesses a sequence name by joining the table name and pk name together. Irritating, as I just want it to leave the name as it is.

Now, if the resulting name is longer than 50 characters, it no longer fits into a varchar(50) field that is used in the Servoy repository to store sequence names… and the import fails.

I pointed out to Jan that in PostgreSQL, if you create a field of type serial, the database will autocreate a sequence. I’m not sure that guessing behaviour is part of servoy of some library/layer (hibernate?) that Servoy sits on top of.

In the end I successfully imported my solution against a populated database using a Servoy containing a patch. So my pk are OK, but I have s small number of Servoy sequences to re-synch.

swingman:
…Servoy thinks it is not capable of defining the sequences, so it just guesses a sequence name by joining the table name and pk name together. Irritating, as I just want it to leave the name as it is.

Now, if the resulting name is longer than 50 characters, it no longer fits into a varchar(50) field that is used in the Servoy repository to store sequence names… and the import fails.

thank you, Christian, good tidbit to have in one’s “arsenal of tidbits”!

kazar