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

Entities without @id not working anymore in data 2.4.X #1001

Closed
3 of 4 tasks
bzolivereckle opened this issue May 3, 2021 · 1 comment · Fixed by #1005
Closed
3 of 4 tasks

Entities without @id not working anymore in data 2.4.X #1001

bzolivereckle opened this issue May 3, 2021 · 1 comment · Fixed by #1005
Labels
type: bug Something isn't working
Milestone

Comments

@bzolivereckle
Copy link

After updating Micronaut Data dependencies to 2.4.1 jdbc queries for entities without id do not work anymore.
We are using timescale db as a postgresql extension. Up to 2.3.1 having entities without an id works pretty fine.
After upgrading to 2.4.1 we got into trouble, cause he throws an exception on not finding an id - which is intended from our side.

Task List

  • Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem uploaded to Github
  • Full description of the issue provided (see below)

Steps to Reproduce

  1. Update to Micronaut Data 2.4.1
  2. Implement GenericRepository with JDBC-annotation
  3. Having some entity with only colums like name, value, timestamp
  4. Find data by a specific column like name

Expected Behaviour

JDBC repository should return data after querying by name.

Actual Behaviour

JDBC repository fails to retrieve data and throws an error.

SQL Error executing Query: Entity doesn't have an id!
io.micronaut.data.exceptions.DataAccessException: SQL Error executing Query: Entity doesn't have an id!
	at io.micronaut.data.jdbc.operations.DefaultJdbcRepositoryOperations.findStream(DefaultJdbcRepositoryOperations.java:555)
	at io.micronaut.data.jdbc.operations.DefaultJdbcRepositoryOperations.lambda$findAll$10(DefaultJdbcRepositoryOperations.java:579)
	at io.micronaut.transaction.support.AbstractSynchronousTransactionManager.executeRead(AbstractSynchronousTransactionManager.java:155)
	at io.micronaut.data.jdbc.operations.DefaultJdbcRepositoryOperations.findAll(DefaultJdbcRepositoryOperations.java:577)
	at io.micronaut.data.runtime.intercept.DefaultFindPageInterceptor.intercept(DefaultFindPageInterceptor.java:56)
	at io.micronaut.data.intercept.DataIntroductionAdvice.intercept(DataIntroductionAdvice.java:80)
	at io.micronaut.aop.chain.MethodInterceptorChain.proceed(MethodInterceptorChain.java:96)

Environment Information

  • Operating System: Windows 10
  • Micronaut Version: 2.4.2
  • JDK Version: AdoptOpenJDK 11.0.11
@graemerocher graemerocher added the type: bug Something isn't working label May 3, 2021
@dstepanov
Copy link
Contributor

@dstepanov dstepanov added this to the 2.4.2 milestone May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants