Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • 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
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

"JPA & Hibernate Training" - Keying on Embeddables

 
Ranch Hand
Posts: 58
Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Richard,

I am currently on the path to JPA certification.

I.Y.O Are there enough and practical real-world justifications out there to warrant support in the JPA 2.x spec for keying on embeddables (rather than first class entities) when mapping key/value pair collections to relational data stores? Was this move more about 'completeness' than promotion of best design/coding practice? What's your take.
 
Virtual Pair Programmers Rep
Posts: 29
7
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

A good deep question. I've never come across a situation where I've needed to use an embeddable as a key on map.

I'm not sure it's about completeness, there are still some important things missing from JPA (example at my blog here). Sometimes committee standards have eccentric elements that can often be explained away by "design by committee". Perhaps someone on the committee decided embeddable map keys were of critical importance and they just had a louder voice than everyone else?

If anyone at JavaRanch can give a good example of embeddable map key I'd be very interested. We don't cover them on the course by the way - honestly, I'd almost forgotten they existed!

Cheers,
Richard.
 
I'm thinking about a new battle cry. Maybe "Not in the face! Not in the face!" Any thoughts tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic