Steve Ebersole (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNTZlYzJkNDg5...
) / Improvement (
https://hibernate.atlassian.net/browse/HHH-15989?atlOrigin=eyJpIjoiNTZlYz...
) HHH-15989 (
https://hibernate.atlassian.net/browse/HHH-15989?atlOrigin=eyJpIjoiNTZlYz...
) In-line Hibernate settings for sequence and table id generators into mapping XSD (
https://hibernate.atlassian.net/browse/HHH-15989?atlOrigin=eyJpIjoiNTZlYz...
)
Change By: Steve Ebersole (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
In-line Hibernate settings for sequence and table id generators, as opposed to a “Map” of
config.
E.g.
{noformat}<xsd:complexType name="sequence-generator">
<!- Standard JPA attributes -->
<xsd:attribute name="name" type="xsd:string"
use="required"/>
<xsd:attribute name="sequence-name" type="xsd:string"/>
<xsd:attribute name="catalog" type="xsd:string"/>
<xsd:attribute name="schema" type="xsd:string"/>
<xsd:attribute name="initial-value" type="xsd:int"/>
<xsd:attribute name="allocation-size" type="xsd:int"/>
<!-- Extension attributes -->
<xsd:attribute name="per-entity" type="xsd:boolean"/>
<xsd:attribute name="per-entity-suffix" type="xsd:string"/>
<xsd:attribute name="optizer" type="xsd:string"/>
<xsd:attribute name="table-value-column" type="xsd:string"/>
</xsd:complexType name="sequence-generator">{noformat}
And corresponding annotations:
{noformat}
/**
* For use with the standard {@linkplain TableGenerator @TableGenerator}
* providing additional Hibernate configuration of the generator
*
* @see TableGenerator
* @see org.hibernate.id.enhanced.TableGenerator
*
* @author Steve Ebersole
*/
@Target({ANNOTATION_TYPE, TYPE, METHOD, FIELD})
@Retention(RUNTIME)
@Incubating
public @interface TableGeneratorExtension {
/**
* The name of the associated {@linkplain TableGenerator @TableGenerator}.
*
* @see TableGenerator#name()
*/
String name();
/**
* Specific type of {@linkplain org.hibernate.id.enhanced.Optimizer optimizer} to use,
* if any, to optimize access to the underlying table.
*
* @see org.hibernate.id.enhanced.OptimizerDescriptor
* @see org.hibernate.id.enhanced.StandardOptimizerDescriptor
*/
String optimizerName() default "";
/**
* Hibernate's default is to use a single row for all generators mapped to it,
* using {@link org.hibernate.id.enhanced.TableGenerator#DEF_SEGMENT_VALUE}
* as the {@link org.hibernate.id.enhanced.TableGenerator#DEF_SEGMENT_COLUMN}.
* <p/>
* This tells Hibernate to instead use a row for each mapped generator. The
* entity name mapped to the generator table
*
* @see org.hibernate.id.enhanced.TableGenerator#CONFIG_PREFER_SEGMENT_PER_ENTITY
* @see AvailableSettings#ID_DB_STRUCTURE_NAMING_STRATEGY
*/
boolean perEntity() default false;
}{noformat}
(
https://hibernate.atlassian.net/browse/HHH-15989#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15989#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100227- sha1:674e4eb )