public ComponentType(ComponentMetamodel metamodel) { // for now, just "re-flatten" the metamodel since this is temporary stuff anyway (HHH-1907) isKey = metamodel.IsKey; propertySpan = metamodel.PropertySpan; propertyNames = new string[propertySpan]; propertyTypes = new IType[propertySpan]; propertyNullability = new bool[propertySpan]; cascade = new CascadeStyle[propertySpan]; joinedFetch = new FetchMode?[propertySpan]; for (int i = 0; i < propertySpan; i++) { StandardProperty prop = metamodel.GetProperty(i); propertyNames[i] = prop.Name; propertyTypes[i] = prop.Type; propertyNullability[i] = prop.IsNullable; cascade[i] = prop.CascadeStyle; joinedFetch[i] = prop.FetchMode; } tuplizerMapping = metamodel.TuplizerMapping; var tuplizer = tuplizerMapping.GetTuplizerOrNull(EntityMode.Poco); if(tuplizer !=null) { overridesGetHashCode = ReflectHelper.OverridesGetHashCode(tuplizer.MappedClass); } }
public ComponentType(ComponentMetamodel metamodel) { // for now, just "re-flatten" the metamodel since this is temporary stuff anyway (HHH-1907) isKey = metamodel.IsKey; propertySpan = metamodel.PropertySpan; propertyNames = new string[propertySpan]; propertyTypes = new IType[propertySpan]; propertyNullability = new bool[propertySpan]; cascade = new CascadeStyle[propertySpan]; joinedFetch = new FetchMode?[propertySpan]; for (int i = 0; i < propertySpan; i++) { StandardProperty prop = metamodel.GetProperty(i); propertyNames[i] = prop.Name; propertyTypes[i] = prop.Type; propertyNullability[i] = prop.IsNullable; cascade[i] = prop.CascadeStyle; joinedFetch[i] = prop.FetchMode; } tuplizerMapping = metamodel.TuplizerMapping; }
private IType BuildType() { // TODO : temporary initial step towards HHH-1907 ComponentMetamodel metamodel = new ComponentMetamodel(this); // TODO NH : The proble to mange correctly EmbeddedComponentType is in binders (NH-1405) //if (IsEmbedded) //{ // return new EmbeddedComponentType(metamodel); //} //else //{ return new ComponentType(metamodel); //} }
private IType BuildType() { // TODO : temporary initial step towards HHH-1907 ComponentMetamodel metamodel = new ComponentMetamodel(this); if (IsEmbedded) { return new EmbeddedComponentType(metamodel); } else { return new ComponentType(metamodel); } }
public EmbeddedComponentType(ComponentMetamodel metamodel) : base(metamodel) { }