I am trying to do JUnit tests with H2, and my APP is configurated to work 
with PostgreSQL, and with ACL's Spring Boot.

So I have to add into the app the next two lines,

mutableAclService.setClassIdentityQuery("select 
currval(pg_get_serial_sequence('acl_class', 'id'))");
mutableAclService.setSidIdentityQuery("select 
currval(pg_get_serial_sequence('acl_sid', 'id'))");

to create the AclService.

I have in the application.properties the 
configuration spring.datasource.url=jdbc:h2:~/test_db;MODE=PostgreSQL.

But it always returns me, 
org.springframework.jdbc.UncategorizedSQLException: StatementCallback; 
uncategorized SQLException for SQL [select 
currval(pg_get_serial_sequence('acl_sid', 'id'))]; SQL state [90022]; error 
code [90022]; Function "PG_GET_SERIAL_SEQUENCE" not found; SQL statement:
select currval(pg_get_serial_sequence('acl_sid', 'id')) [90022-197]; nested 
exception is org.h2.jdbc.JdbcSQLException: Function 
"PG_GET_SERIAL_SEQUENCE" not found; SQL statement
...

Anyone knows how to fix it?


-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/554c3420-b934-4d82-932b-22b1924c5487%40googlegroups.com.

Reply via email to