Re: using a function in an insert / NumberFormatException

2012-04-21 Thread Lukas Eder
Hello, > (or an equivalent) among the many variations. Thanks for clarifying > which one was right, and good to know there is a bug, and I was not > just being stupid! :^) Yes, that must've been a regression, introduced somewhere in 2.1.x > As to the circumstance of performing this insert with t

Re: using a function in an insert / NumberFormatException

2012-04-21 Thread ericjs
Ignore the second paragraph of my previous comment...I'd started writing that first and after looking at the code realized the answers and meant to delete it. I also tried the ORGANIZATION_ID_SEQ.nextval() and still got the NumberFormatException so I guess I answered my own question there too. :^)

Re: using a function in an insert / NumberFormatException

2012-04-21 Thread ericjs
Actually I realized I had missed the jist of the first part of your reply: On Apr 21, 1:18 pm, Lukas Eder wrote: > Hi Eric, > > > insert into "public"."organization" ("id", "name", "entity_type_code") > > values (nextval('organization_id_seq'), 'fu', 'C'); > > Sequences should be generated, usual

Re: using a function in an insert / NumberFormatException

2012-04-21 Thread ericjs
Thank you! Yes, I tried Factory.function("nextval", SQLDataType.BIGINT, Factory.field("'" + sequenceName + "'")); (or an equivalent) among the many variations. Thanks for clarifying which one was right, and good to know there is a bug, and I was not just being stupid! :^) As to the circumstance

Re: using a function in an insert / NumberFormatException

2012-04-21 Thread Lukas Eder
Hi Eric, > insert into "public"."organization" ("id", "name", "entity_type_code") > values (nextval('organization_id_seq'), 'fu', 'C'); Sequences should be generated, usually. So you should be able to use ORGANIZATION_ID_SEQ.nextval() to generate values on inserts. See this page of the manual for