Subject Firebird 3 migration issue with Statement.RETURN_GENERATED_KEYS
Author Felipe Jaekel
Hi,

After upgrading from Firebird 2.5.4 + Jaybird 2.2..14 to Firebird 3.0.4 + Jaybird 3.0.5, places that use Statement.RETURN_GENERATED_KEYS stopped working.

On a SQL like this:
update or insert into SIRES01
(id,
<<fields>>)
values
(:id ,
<<parameters>>)
matching (id) returning id;

I get the following error:
line 1:60 token recognition error at: '>'
line 1:664 token recognition error at: '>'
line 1:419 token recognition error at: '<'
line 1:420 token recognition error at: '>'
line 1:444 token recognition error at: '<'
line 1:445 token recognition error at: '>'
line 1:1614 token recognition error at: '>'
line 11:29 token recognition error at: '<'
line 11:30 token recognition error at: '>'
line 11:54 token recognition error at: '<'
line 11:55 token recognition error at: '>'
line 32:62 token recognition error at: '<'
line 32:63 token recognition error at: '>'
line 1:213 token recognition error at: '<'
line 1:214 token recognition error at: '>'
line 169:26 token recognition error at: ';'
GRAVE: EjbTransactionUtil.handleSystemException: Error preparing statement - Dynamic SQL Error; SQL error code = -104; Token unknown - line 170, column 11; "ID" [SQLState:42000, ISC error code:335544634]
org.sql2o.Sql2oException: Error preparing statement - Dynamic SQL Error; SQL error code = -104; Token unknown - line 170, column 11; "ID" [SQLState:42000, ISC error code:335544634]

I thought it could be related to Sql2o, but the problem happens with plain JDBC too. I also updated antlr-runtime from 3.4 to 4.7.

Do I need additional configuration for Firebird 3?

Thanks in advance,
Felipe