#
XscorX
I am trying to make a mapping for 2 new classes Company, Country
Where company has many users and country contains many companies, but each user exists in one company and each company exists in one country.
After i did the mapping i tried running the project but an error occurred
[Error]
Exception Details: System.Xml.Schema.XmlSchemaException: The 'lazy' attribute is not declared.
[/Error]
Sorry but I am new to Nhibrnate and I tried searching for this error but in vain if any one can help me I will be very grateful
Where company has many users and country contains many companies, but each user exists in one company and each company exists in one country.
After i did the mapping i tried running the project but an error occurred
[Error]
Exception Details: System.Xml.Schema.XmlSchemaException: The 'lazy' attribute is not declared.
[/Error]
Sorry but I am new to Nhibrnate and I tried searching for this error but in vain if any one can help me I will be very grateful
((?xml version="1.0" encoding="utf-8" ?))
((hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"))
((class name="Cuyahoga.Core.Domain.Company, Cuyahoga.Core" table="cuyahoga_company"))
((cache usage="read-write" /))
((id name="Id" column="company_Id" type="Int32" unsaved-value="0"))
((generator class="identity"/))
((/id))
((property name="CompanyName" column="company_name" type="String" length="100" /))
((property name="Address1" column="address1" type="String" length="100" /))
((property name="Address2" column="address2" type="String" length="100" /))
((property name="Phone" column="phone" type="String" length="25" /))
((property name="Fax" column="fax" type="String" length="25" /))
((property name="City" column="city" type="String" length="100" /))
((property name="Website" column="website" type="String" length="100" /))
((property name="State" column="state" type="String" length="50" /))
((property name="PostalCode" column="postalcode" type="String" length="20" /))
((property name="Industry" column="industry" type="String" length="250" /))
((property name="InsertTimestamp" column="inserttimestamp" type="DateTime" /))
((property name="UpdateTimestamp" column="updatetimestamp" type="DateTime" /))
((bag name="Users" cascade="none" lazy="true"))
((key column="companyId"/))
((one-to-many class="Cuyahoga.Core.Domain.User, Cuyahoga.Core.Domain.Company " /))
((/bag))
((many-to-one name="CompanyCountry" class="Cuyahoga.Core.Domain.Country, Cuyahoga.Core.Domain.Company" column="countryid" cascade="all"/))
((/class))
((/hibernate-mapping))
((?xml version="1.0" encoding="utf-8" ?))
((hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"))
((class name="Cuyahoga.Core.Domain.Country, Cuyahoga.Core" table="cm_country"))
((cache usage="read-write" /))
((id name="Id" column="Country_Id" type="Int32" unsaved-value="0"))
((generator class="identity"/))
((/id))
((property name="Name" column="Country_Name" type="String" length="50" /))
((property name="Code" column="Country_Code" type="String" length="50" /))
((bag name="Companies" cascade="all" lazy="true"))
((key column="countryid"/))
((one-to-many class="Cuyahoga.Core.Domain.Company, Cuyahoga.Core.Domain.Country" /))
((/bag))
((/class))
((/hibernate-mapping))
((?xml version="1.0" encoding="utf-8" ?))
((hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"))
((class name="Cuyahoga.Core.Domain.User, Cuyahoga.Core" table="cuyahoga_user"
proxy="Cuyahoga.Core.Domain.User, Cuyahoga.Core"))
((cache usage="read-write" /))
((id name="Id" column="userid" type="Int32" unsaved-value="-1"))
((generator class="native"))
((param name="sequence"))cuyahoga_user_userid_seq((/param))
((/generator))
((/id))
((timestamp name="UpdateTimestamp" column="updatetimestamp" /))
((property name="UserName" column="username" type="String" length="50" /))
((property name="Password" column="password" type="String" length="100" /))
((property name="FirstName" column="firstname" type="String" length="100" not-null="false" /))
((property name="LastName" column="lastname" type="String" length="100" not-null="false" /))
((property name="Title" column="title" type="String" length="50" /))
((property name="Email" column="email" type="String" length="100" /))
((property name="Website" column="website" type="String" length="100" /))
((property name="TimeZone" column="timezone" type="Int32" /))
((property name="IsActive" column="isactive" type="Boolean" length="100" /))
((property name="LastLogin" column="lastlogin" type="Nullables.NHibernate.NullableDateTimeType, Nullables.NHibernate" /))
((property name="LastIp" column="lastip" type="String" length="40" /))
((property name="InsertTimestamp" column="inserttimestamp" type="DateTime" /))
((many-to-one name="UserCompany" class="Cuyahoga.Core.Domain.Company, Cuyahoga.Core.Domain.User" column="companyid" cascade="all" lazy="true"/))
((bag name="Roles" table="cuyahoga_userrole" cascade="none" lazy="true"))
((cache usage="read-write" /))
((key column="userid" /))
((many-to-many class="Cuyahoga.Core.Domain.Role, Cuyahoga.Core" column="roleid" outer-join="true" /))
((/bag))
((/class))
((/hibernate-mapping))