Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
HHH-4347 default column names/properties on CompositeUserType #11
I've created a small patch to allow a CompositeUserType to define a default column mapping (using @columns and @column annotations), which will be concatenated with the name of the property to give unique names for an entity.
I opted to allow the @column annotations instead of the getPropertyNames(), as it is conceptually the same as using these on the property in the entity containing the type today, and it allows for defining other defaults as well (length, precision, nullable, etc).
The patch is backwards-compatible so if any CompositeUserType does not define any of these annotations then everything works the same as before. Also, any @Columns/@column annotations on a property in an entity will override the default defined.