Skip to content
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

QueryDslJdbcTemplate#queryForObject(SQLQuery, ExpressionBase<T>) should accept Expression<T> as 2nd param [DATAJDBC-34] #291

Closed
spring-projects-issues opened this issue Aug 29, 2012 · 0 comments
Assignees
Labels
type: bug A general bug

Comments

@spring-projects-issues
Copy link

ryo murai opened DATAJDBC-34 and commented

QueryDslJdbcOperations#queryForObject(SQLQuery, ExpressionBase<T>)
breaks a spec described its javadoc: The results are mapped using the {@link ExpressionBase} which could be a QBean or a MappingProjection.
Because QBean(extends RelationalPathBase) is not an ExpressionBase but Expression, I can't pass a QBean object as ExpressionBase. The compilation fails at below line.
template.queryForObject(sqlQuery, QBeanObj)


Affects: Ext 1.0 M2

Reference URL: https://github.com/SpringSource/spring-data-jdbc-ext/blob/master/spring-data-jdbc-core/src/main/java/org/springframework/data/jdbc/query/QueryDslJdbcTemplate.java#L206

Referenced from: commits spring-attic/spring-data-jdbc-ext@3225617

1 votes, 2 watchers

@spring-projects-issues spring-projects-issues added the type: bug A general bug label Dec 31, 2020
mp911de added a commit that referenced this issue Feb 21, 2022
We now use SqlIdentifier to encapsulate the table and column name across the API. The fluent DatabaseClient API accepts the table name and select column projections as SqlIdentifier. The Criteria API remains String-based as names for Query and Update objects may reference either column names or property names.

QueryMapper and UpdateMapper require now a R2DBC dialect object to be constructed. R2dbcMappingContext is configured in a way to not require quoting to preserve backwards compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants