I have ported the DTD to XSD
This is the DTD chunk of Hibernate 3.3.1
<!ELEMENT key-property (meta*,column*,type?)>
<!ATTLIST key-property name CDATA #REQUIRED>
<!ATTLIST key-property access CDATA #IMPLIED>
<!ATTLIST key-property type CDATA #IMPLIED>
<!ATTLIST key-property column CDATA #IMPLIED>
<!ATTLIST key-property length CDATA #IMPLIED>
<!ATTLIST key-property node CDATA #IMPLIED>

<!-- A many-to-one association embedded in a composite identifier or map
index
(always not-null, never cascade). -->

<!ELEMENT key-many-to-one (meta*,column*)>
<!ATTLIST key-many-to-one name CDATA #REQUIRED>
<!ATTLIST key-many-to-one access CDATA #IMPLIED>
<!ATTLIST key-many-to-one class CDATA #IMPLIED>
<!ATTLIST key-many-to-one entity-name CDATA #IMPLIED>
<!ATTLIST key-many-to-one column CDATA #IMPLIED>
<!ATTLIST key-many-to-one foreign-key CDATA #IMPLIED>
<!ATTLIST key-many-to-one lazy (false|proxy) #IMPLIED>

As you can see there isn't neither "insert" nor "update"...
perhaps it is because we are talking about the PK and an "insert=false" in
the PK is something at least strange.

If you really need it we can change the XSD in NH-Core but I need to check
how Hibernate is managing an "insert=false" in a PK column.

2010/3/22 Simon Duduica <[email protected]>

> Hey, any answer at all would be greatly appreciated!
>
> I got over point 1., 2 is still actual and now I got stuck in the
> following problem: The xml mapping document for Envers needs some
> added attributes for the tag key-property (insert and update, both
> bool) and for key-many-to-one (type), but the schema validation fails
> because of these added properties in
> NHibernate.Cfg.XmlHbmBinding.Binder.Deserialize[T](XmlNode node)
>
> This is the mapping:
>
>        <hibernate-mapping assembly="Envers.NET" xmlns="urn:nhibernate-
> mapping-2.2" auto-import="false">
>                <class entity-name="Envers.Net.Model.Address_AUD"
> table="Address_AUD">
>                        <composite-id name="originalId">
>                                <key-property name="id" insert="true"
> update="false"
> type="SimpleValue">
>                                        <column name="id" length="255"
> scale="2" precision="19" />
>                                </key-property>
>                                <key-many-to-one type="integer"
> class="NHibernate.Envers.DefaultRevisionEntity" name="REV">
>                                        <column name="REV" />
>                                </key-many-to-one>
>                        </composite-id>
>                        <property name="REVTYPE" insert="true"
> update="false"
> type="NHibernate.Envers.Entities.RevisionTypeType" />
>                </class>
>        </hibernate-mapping>
>
> The first option seems to add the attributes to tne hibernate-
> mapping.xsd schema. What do you think?
>
> --
> You received this message because you are subscribed to the Google Groups
> "NHibernate Contrib - Development Group" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nhcdevs%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhcdevs?hl=en.
>
>


-- 
Fabio Maulo

-- 
You received this message because you are subscribed to the Google Groups 
"NHibernate Contrib - Development Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhcdevs?hl=en.

Reply via email to