Binding parameters to Query / ProcedureCall #4597
Replies: 3 comments 18 replies
This looks pretty good to me. It:
which resolves my objections nicely. OTOH, why did you get rid of its type parameter? I would have kept it, I think, for a teensy bit of type safety.
I don't really care if it lives or dies. The only think I would say in its defense is that now with |
|
One more comment. I'm not too keen on calling these methods |
|
Currently we support binding an Object-valued value with a However, that no longer matches any
Long story short, I cannot see a way to make this work from a user perspective in this not unusual situation. I can see a few options...
And of course, we could do both. (1) is pretty straight-forward. Yes, |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Queryhas a lot of methods to bind parameters. I propose we clean these up.https://hibernate.atlassian.net/browse/HHH-15017
Type determination
There are multiple overloads with regards to influencing the "binding type" which should be used to bind these values to JDBC - ultimately resolved to
org.hibernate.metamodel.mapping.Bindablebehind the scenes.So the first proposal has to do with what kind of things we want to accept for influencing the binding-type.
We currently have overloads accepting
AllowableParameterTypeas well asBasicTypeReference. We should consolidate these into a single overload via inheritance.AllowableParameterTypeallows for embeddables, whereasBasicTypeReferencecan only be used for basic-valued types.There are obviously many ways to achieve such consolidation...
AllowableParameterTypeBasicTypeReferenceimplementAllowableParameterTypeAllowableParameterTypereferences, including embeddablesSomething like:
Query.setPropertiesDo people actually use this? I have personally never used it, and have not seen any bug/enhancement requests related to it in years. Should we just drop this?
All reactions