• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

JPA, Hibernate and (?) missing entity field  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey ya all!

So I've been working on my tiny little project based on the usual: Spring, JPA, AOP and Hibernate. And I ran into a rather weird case... JPA Repo method  cannot find one of my entity  fields.



without @Query annotation app fails with exc:




Datamodel looks smth like:









And if I comment out the second @Fetch(FetchMode.SUBSELECT) (over "floor" field), the exc looks even funnier:






So my question is.. What's wrong with my JPA method name and why doesn't it work without a native qry specified?

And why does Hibernate suddenly does not see a field without @Fetch(SUBSELECT) annotation, even though it DOES see it (see exc message)?

(the first question is more important to me; the second one -- just curious)


versions.gradle

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!