Skip to content

Instantly share code, notes, and snippets.

@gbadner
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gbadner/057dac7388205352765c to your computer and use it in GitHub Desktop.
Save gbadner/057dac7388205352765c to your computer and use it in GitHub Desktop.
Objects needing logical/physical names
Table names:
Primary table
Currently generated by: NamingStrategy.classToTableName(String className)
Input: LogicalPrimaryTableNameSource
Secondary table:
Element collection table name:
Inputs:
EntityNamingSource ownerEntityNamingSource
LogicalTableName ownerPrimaryTableName
String collectionPropertyPath
Association join table:
Inputs:
EntityNamingSource ownerEntityNamingSource
LogicalTableName ownerPrimaryTableName
String ownerAssociationPath
EntityNamingSource associatedEntityNamingSource
LogicalTableName associatedPrimaryTableName
Column names:
ID
Discriminator
Version (?)
Basic
Embeddable
Index
Order column (e.g., for a List)
ID (e.g., IdBag)
Map key:
basic
embeddable
entity
FK column name:
In secondary table referencing primary
Column in CollectionTable/JoinTable (e.g., plural)
Owner side
Inverse side
Map key join column
Collection value:
Unique column name (?):
Contraint names:
Foriegn key name
Unique key name
Index name
Unique
Non-unique
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment