© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Java Community | Help. Code. Learn.JC|HCL
Java Community | Help. Code. Learn.•13mo ago•
55 replies
red

Help me with spring JDBC

Hello, I'm using spring data JDBC to manage two entities, but I am getting a rather strange exception when testing the UserRepository. Spring is trying to map the "users_key" attribute of the "expense" table, but this attribute is nonexistent. I'm sure the core problem is in the mapping of the "expense" attribute of the User entity, because when I annotate the attribute as @Transient, the exception doesn't occur.

Below are the images of the entities, the SQL script to generate the tables, the test code, the repository and the stack trace
Screenshot_2025-01-16-13-42-47-599_com.github.android.jpg
Screenshot_2025-01-16-13-42-54-830_com.github.android.jpg
Screenshot_2025-01-16-13-43-16-185_com.github.android.jpg
Screenshot_2025-01-16-13-43-39-351_com.github.android.jpg
Screenshot_2025-01-16-13-44-03-673_com.github.android.jpg
Java Community | Help. Code. Learn.Join
We are a Community full of Java developers. Connect with other devs, get help, help others and do much more!
27,705Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Spring JDBC
Java Community | Help. Code. Learn.JC|HCLJava Community | Help. Code. Learn. / java-help
2y ago
Spring JDBC
Java Community | Help. Code. Learn.JC|HCLJava Community | Help. Code. Learn. / java-help
2y ago
Next page