hibernate-orm icon indicating copy to clipboard operation
hibernate-orm copied to clipboard

enhance type-checked result effect during the call to createQuery()

Open FULaBUla opened this issue 1 year ago • 4 comments

I have provided an implementation for HH-17926, please check it out.

https://hibernate.atlassian.net/browse/HHH-17926

FULaBUla avatar Apr 11 '24 15:04 FULaBUla

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

Is there anything I would like to change about this branch? @gavinking

FULaBUla avatar Apr 24 '24 15:04 FULaBUla

So with this PR I get error messages formatted like this:

Missing constructor for class 'org.hibernate.orm.test.query.sqm.domain.ConstructedLookupListItem' with parameter types [[class java.lang.Integer, class java.lang.Integer]] (mismatch at position [2](java.lang.Integer -> java.lang.String)) [select new org.hibernate.orm.test.query.sqm.domain.ConstructedLookupListItem( e.id, 1 ) from EntityOfBasics e]
  1. Why are there stacked [[ brackets here?
  2. There should be a space between [2] and (java.lang.Integer
  3. The nested parentheses are unnecessary and noisy.
  4. There is no need for class in class java.lang.Integer, I know it's a class.
  5. This simply isn't following the conventions we're trying to standardize on.

So the total effect is noisy and ugly.

gavinking avatar Aug 26 '24 01:08 gavinking

Sometimes it's true that less is more, by the way.

gavinking avatar Aug 26 '24 01:08 gavinking