This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(11:26:53 AM) sebersole: i almost want to make it build the "domain model" first | |
(11:27:23 AM) sebersole: and use that to reference class names, attributes, etc | |
(11:27:34 AM) gbadner: +1 | |
(11:28:03 AM) gbadner: I understand now why you had Type.getClassName() and getClassReference() | |
(11:29:00 AM) gbadner: it would be really nice if o.h.metamodel.spi.Type encapsulated HibernateTypeDescription | |
(11:29:15 AM) sebersole: it cant always | |
(11:29:30 AM) sebersole: especially in the case of composites | |
(11:29:56 AM) sebersole: think the distinction between Embeddable and Embedded | |
(11:30:13 AM) sebersole: Type would be the Embeddable | |
(11:30:28 AM) sebersole: HibernateTypeDescription would be the Embedded |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Mappings { | |
... | |
/** | |
* Get the current naming strategy. | |
* | |
* @return The current naming strategy. | |
*/ | |
@deprecated | |
public NamingStrategy getNamingStrategy(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Table names: | |
Primary table | |
Currently generated by: NamingStrategy.classToTableName(String className) | |
Input: LogicalPrimaryTableNameSource | |
Secondary table: | |
Element collection table name: | |
Inputs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3Column.java b/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3Column.java | |
index c6a2856..c10a5ee 100644 | |
--- a/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3Column.java | |
+++ b/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3Column.java | |
@@ -34,6 +34,7 @@ import org.hibernate.annotations.ColumnTransformers; | |
import org.hibernate.annotations.Index; | |
import org.hibernate.annotations.common.reflection.XProperty; | |
import org.hibernate.cfg.annotations.Nullability; | |
+import org.hibernate.cfg.naming.ImplicitAttributeColumnNameSource; | |
import org.hibernate.internal.CoreMessageLogger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Provides access to the appropriate {@link NamingStrategyDelegate}. | |
* | |
* @author Gail Badner | |
*/ | |
public interface NamingStrategyDelegator { | |
public void injectNamingStrategy(NamingStrategy namingStrategy); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Build ServiceRegistry | |
--------------------- | |
Map config = ...; | |
A) ServiceRegistry serviceRegistry = | |
new ServiceRegistryBuilder( config ) | |
... | |
.buildServiceRegistry(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MetadataImpl constructor: | |
public MetadataImpl(MetadataSources metadataSources, ProcessingOrder preferredProcessingOrder) { | |
this.serviceRegistry = metadataSources.getServiceRegistry(); | |
this.namingStrategy = metadataSources.getNamingStrategy(); | |
final ArrayList<String> processedEntityNames = new ArrayList<String>(); | |
if ( preferredProcessingOrder == ProcessingOrder.HBM_FIRST ) { | |
applyHibernateMappings( metadataSources, processedEntityNames ); | |
applyAnnotationMappings( metadataSources, processedEntityNames ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) MetadataSources -> Metadata -> SessionFactory process | |
[HHH-6107] - Metamodel dependence on ServiceRegistry (Steve: done) | |
[HHH-6138] - Implement addition of annotated classes and packages in MetadataSources (Steve: done) | |
[HHH-6141] - Develop scheme for ordered processing of MetadataSources sources (Steve: done) | |
A) for HBM XML | |
[HHH-2578] - redesign SessionFactory building (Steve: done) | |
[HHH-6145] - Create an "xml binding" service (Steve: open) | |
B) for EM | |
[HHH-6149] - Clean up EJB3Configuration (Steve: open) | |
[HHH-6159] - Determine best way to handle EntityManagerFactory building |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HHH-6227 will provide a way to update Entity/Attribute objects in EntityBinding/AttributeBinding objects | |
EntityBinding entityBinding = | |
new EntityBinding( name ) | |
.initialize( new HbmEntityBindingState( getHibernateMappingBinder(), ... ) | |
.initialize( new HbmEntityRelationalState( getHibernateMappingBinder(), ... ); | |
entityBinding.setEntity( new Entity( name ) ) can be called immediately or later | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the new metamodel code, it appears that both "Attribute" and "Value" bindings are modelled using AttributeBinding. The places I've seen references to "Value" bindings (EntityIdentifier, Discriminator) don't necessarily have a domain representation. | |
I'm working on @IdClass, and this an example where the IdClass itself does not have a representation in the domain model. | |
I'd like to make some improvements. | |
NOTE: This uses POJO terminology; this applies to other entity modes as well. | |
EntityBinding knows about 3 different kinds of bindings: |
OlderNewer