Skip to content

Allow to retrieve a proxy of Statement#getResultSet during boolean PreparedStatement.execute() #114

@reda-alaoui

Description

@reda-alaoui

Hibernate recently changed the way it fetches insert generated keys for PostgresSQL. Instead of relying on Statement#getGeneratedKeys() and Statement#RETURN_GENERATED_KEYS, it uses Statement#getResultSet this way :

if ( !statement.execute( sql ) ) {
	while ( !statement.getMoreResults() && statement.getUpdateCount() != -1 ) {
		// do nothing until we hit the resultset
	}
}
rs = statement.getResultSet();

Because of this, we need a way to retrieve a Repeatable Statement#getResultSet cached during boolean PreparedStatement.execute().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions