I was trying to use the generatedKeys() method of PreparedStatement to get the autoincrementing primary key of my resultset in an insert query .However it threw a PSQL exception stating --
org.postgresql.util.PSQLException: This method is not yet implemented.
Is there a workaround or another method to implement it through the same query as we do in the case of generatedkeys()? I'm aware of using currval and nextval,any other methods that somebody could suggest?
I believe, generatedKeys() method will be implemented by the JDBC drive you use to connect to a Database.
In case of Oracle this is implemented, however, for PostGreSQL I am not sure whether this is implemented.
Please check if this is the case and try getting a driver for PostGreSQL that supports this feature, otherwise you may need to write custom code to generate the next key.