-
Notifications
You must be signed in to change notification settings - Fork 54
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
PostgreSQL Name Case Issues When Generating Using JPADatabase #189
Comments
Hmmm... Some more information... The actual insertion of the data in the table is successful, it is just the returning of the ID field which causes a problem. |
This seems to be unrelated to the public class RowMappers {
private RowMappers(){}
public static Function<Row,com.redhat.runtimes.data.access.tables.pojos.Todos> getTodosMapper() {
return row -> {
com.redhat.runtimes.data.access.tables.pojos.Todos pojo = new com.redhat.runtimes.data.access.tables.pojos.Todos();
pojo.setId(row.getUUID("ID"));
pojo.setAuthor(row.getString("AUTHOR"));
pojo.setComplete(row.getBoolean("COMPLETE"));
pojo.setCreated(row.getLocalDateTime("CREATED"));
pojo.setDescription(row.getString("DESCRIPTION"));
pojo.setDuedate(row.getLocalDateTime("DUEDATE"));
pojo.setTitle(row.getString("TITLE"));
return pojo;
};
}
public static Function<Row,com.redhat.runtimes.data.access.tables.pojos.Users> getUsersMapper() {
return row -> {
com.redhat.runtimes.data.access.tables.pojos.Users pojo = new com.redhat.runtimes.data.access.tables.pojos.Users();
pojo.setId(row.getUUID("ID"));
pojo.setFamilyname(row.getString("FAMILYNAME"));
pojo.setGivenname(row.getString("GIVENNAME"));
pojo.setName(row.getString("NAME"));
pojo.setPreferredusername(row.getString("PREFERREDUSERNAME"));
return pojo;
};
}
} The calls to |
I am generating jOOQ DAOs using JPADatabase in my example project
For some reason, when I try to create a new row/record using the DAO's
insertReturningPrimary
method, I get the following error:I have tried tweaking the
Configuration
to change how names/fields/schemas are rendered with respect to letter case, but it's pretty hit and miss (Mostly miss) so far. In my database, the column isid
(lower case) and when jOOQ attempts to fetch the column is it asking forID
(upper case) atio.vertx.sqlclient.Row.getValue(Row.java:65)
at which point it fails.Any advice? If you would like to run the example project:
Issue-7-_-Debug_createTodo_operation
branch:git checkout Issue-7-_-Debug_createTodo_operation
mvn clean compile
docker-compose up
in the root of the projectmvn -pl modules/api clean compile vertx:run
The text was updated successfully, but these errors were encountered: