-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace InsertedIDResultSetHandler with (built-in) ScalarHandler #23
Comments
So if I understand this correctly, you would want to pass in |
Sort of. But no need for the type explicitly, it is inferred:
Of course, that’s using 1.7 type erasure, but the essence of the code works in 1.5 (and hence 1.6) too, just need a cast (and perhaps a @SuppressWarnings(“unchecked”)
|
Thanks. I tried this, but using |
Presumably of I created the class that's being inserted I'd also know what type to expect for the ID. And if I ain't sure I can also introspect the type. Flexibility = power. Rigidity => brittleness and unnecessary limitation.
|
OK, so your idea was to have the client make the call what type it should be. That makes sense, but I'll need to look at it again to see how to do it. I'll reopen it. |
ScalarHandler is generic, built-in, already in use, and more robust - not limited to one type. Common case to have INT generated primary keys, so the custom class is brittle.
The text was updated successfully, but these errors were encountered: