Have updated code as per improvement. Kindly review
https://github.com/hibernate/hibernate-orm/pull/2783