-
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
Incorrect value for field #2
Comments
We can change that by using the Another option is to add an I think I like Option 1 better. That's what spring data does and it's very user friendly, despite being less efficient (ResultSet javadoc says "In general, using the column index will be more efficient") WDYT? |
Yeah, 1 option is more friendly |
Yep agreed. I think we will want to add |
But what do think about separation DbCodec on two parts: DbCodec as reader by column names and DbIndexedCodec as reader by index ? I can take it to work |
Sweet, thanks for taking it on. I am biased towards just having it all in
the one DbCodec, since there are no cases where you can do one but not the
other.
…On Sun, Jun 25, 2023, 7:16 AM Evgeny Afanasev ***@***.***> wrote:
But what do think about separation DbCodec on two parts: DbCodec as reader
by column names and DbIndexedCodec as reader by index ? I can take it to
work
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQOKNT7OE6CYDTW64GXUM3XNBB37ANCNFSM6AAAAAAZSU4ULI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@EvgenyAfanasev just a quick remark - tuples don't make much sense with named args but they do make a lot of sense with positional args. I guess derivation will have to make that choice and go with labels for case classes and indexes for tuples. |
Right. If we end up going with |
I'd still support tuples, they are awesome for arbitrary queries that pull small pieces of larger tables. Is it a big deal to support both labeled and positional writing/reading in DbCodec? |
Just read this thread, and thought that the proposal for I think, it would be great to support them when they are available. |
Hi. I have next model:
With next values:
Modules(1, "Module title", 2, Some("Module Description"))
And with next table definition:
id INT
title VARCHAR(255)
description VARCHAR(255)
course_id INT
And when I tried add entity using
insertReturning
method I received errorIncorrect value for int: Module Description
I checked columns in my table definition and see problem with order of model attributes. I have to create ordering of case class properties like in database for working. Is it correct behavior ? IMHO, developer hasn't to think about ordering tables columns for creating dao layer
The text was updated successfully, but these errors were encountered: