I've created a gist with an overview of the design:
https://gist.github.com/gbadner/f0e635e8fba7b84af233 . I will add a new
section tomorrow about possible shortcomings.
Here is my POC:
https://github.com/hibernate/hibernate-orm/compare/master...gbadner:HHH-1...
. Although no tests fail, the approach may be too simple to model what is
necessary.
At this point the POC is squashed down to 1 commit:
https://github.com/hibernate/hibernate-orm/commit/3d0e2378cb998788b3205af...
Have a look and feel free to comment.
Thanks,
Gail