PostgreSQL lock query exception. 5.0.3 generates "for update of" instead of "for share"

Description

After updating from 5.0.2 to 5.0.3 obtaining lock like this:
entityManager.find(SalesSummaryEntity.class, salesSummary.getId(), LockModeType.PESSIMISTIC_READ, timeoutProperties)

triggers Postgre SQL exception. ERROR: syntax error at end of input Position: 155

Debugging shows that 5.0.2 generates the following query:
/* PESSIMISTIC_READ lock com.avk.gtd.common.persistence.deals.entities.SalesSummaryEntity */
select id from SalesSummaryEntity where id =? for share

while 5.0.3 uses unsupported by POSTGRES "for update of" instead of "for share":
/* PESSIMISTIC_READ lock com.avk.gtd.common.persistence.deals.entities.SalesSummaryEntity */
select id from SalesSummaryEntity where id =? for update of

Thank you.

Environment

postgresql:9.3-1103-jdbc41;hibernate-core;hibernate-entitymanager;hibernate-java8;hibernate-spatial;hibernate-ehcache

Assignee

Unassigned

Reporter

Alexander Kovalevich

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure