Bug 1268468 - [GSS](6.4.z) HHH-10161 - Hibernate ignores return value from javax.persistence.Parameter#getParameterType()
[GSS](6.4.z) HHH-10161 - Hibernate ignores return value from javax.persistenc...
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: CR1
: EAP 6.4.6
Assigned To: Gail Badner
Martin Simka
Depends On: 1225631
Blocks: 1235746 1286824
  Show dependency treegraph
Reported: 2015-10-02 17:10 EDT by Ricardo Martinelli de Oliveira
Modified: 2017-01-17 06:49 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1225631
Last Closed: 2017-01-17 06:49:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Comment 3 Gail Badner 2015-11-09 14:08:35 EST
Pull request:  https://github.com/hibernate/hibernate-orm/pull/1138

The pull request will use the value returned by javax.persistence.Parameter#getParameterType only when binding a null value, and only when Hibernate has no other way to determine the type (e.g., native queries).

NOTE: Javadoc for javax.persistence.Parameter#getParameterType says:

"This method is required to be supported for criteria queries only. Applications that use this method for Java Persistence query language queries and native queries will not be portable."

In other words, the fix in the pull request is not portable for native queries. I don't see any way to provide this information that is portable, so I've implemented a fix to deal with this particular situation.
Comment 5 Gail Badner 2015-11-30 12:53:53 EST
This has been fixed in Hibernate ORM master and 5.0 branches, released in Hibernate ORM 5.0.4.
Comment 12 Jan Martiska 2016-01-19 08:22:26 EST
Verified in EAP 6.4.6.CR2
Comment 13 Petr Penicka 2017-01-17 06:49:30 EST
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.

Note You need to log in before you can comment on or make changes to this bug.