private static GenerationMetaData GetGenMetaData(IPropertyHolder holder)
        {
            if (!holder.HasProperty("#GENERATION_META_DATA"))
            {
                holder.AddProperty("#GENERATION_META_DATA", new GenerationMetaData());
            }

            return(holder.GetPropertyAs <GenerationMetaData>("#GENERATION_META_DATA"));
        }
Exemplo n.º 2
0
        public Property Bind()
        {
            ValidateBind();
            log.DebugFormat("binding property {0} with lazy={1}", name, lazy);
            string containerClassName = holder == null ? null : holder.ClassName;
            var    value = new SimpleValueBinder();

            value.SetMappings(mappings);
            value.SetPropertyName(name);
            value.SetReturnedClassName(returnedClassName);
            value.SetColumns(columns);
            value.SetPersistentClassName(containerClassName);
            value.SetType(property, returnedClass);
            value.SetMappings(mappings);
            SimpleValue propertyValue = value.Make();

            SetValue(propertyValue);
            Property prop = Make();

            holder.AddProperty(prop, columns);
            return(prop);
        }