Today, only specific mapping are described, I think it would be quite beneficial to show all possible mappings in a somewhat compact form.
-
-
What to cover
-
-
-
Type and property
Show @Table, @Column influence and their default value.
-
-
-
Identifier
Show identifier specificities like MongoDB's _id and how @EmbeddedId is supported. Show how the generators are mapped
-
-
-
Embeddable and collection of embeddable
Show embeddable and collection of embeddable. In particular show how @CollectionTable influences things.
-
-
-
Association
This is the beefy stuff.
For each show unidirectional and bidirectional.
Show all To mappings, the influence of @JoinColumn, @JoinTable and the default values when not used. Show the influence of simple and embedded ids.
-
-
-
Inheritance?
Not sure if we should cover it now.
-
-
How to display it
That's the hard part. Using a table seems the easy solution but it does not scale well on PDF, ePub nor "narrow" sltes. I'd advise against it.
Maybe extremely concise examples with few to no text is the best approach.
|