Hi,
Let's say we have a table "Customers" with columns as
CustomerID - (int) PK
FullName - varchar(100) Mandatory,
LastName - varchar(100) Mandatory,
EmailID - varchar(100) Mandatory,
Country - varchar(100) Mandatory,
PhoneNo - varchar(100) Not Mandatory,
MobileNo - varchar(100) Not Mandatory.
However, when I use LLBLGen, the generated hbm.xml file contains as below.
<class name="Customer" table="[dbo].[Customer]" optimistic-lock="version" >
<id name="CustomerID" column="CustomerID" access="field.camelcase-underscore" >
<generator class="assigned"/>
</id>
<property name="FullName" column="FullName" access="field.camelcase-underscore"/>
<property name="LastName" column="LastName" access="field.camelcase-underscore"/>
<property name="EmailID" column="EmailID" access="field.camelcase-underscore"/>
<property name="Country" column="Country" access="field.camelcase-underscore"/>
<property name="PhoneNo" column="PhoneNo" access="field.camelcase-underscore"/>
<property name="MobileNo" column="MobileNo" access="field.camelcase-underscore"/>
Now, I would like to have few more attributes to the <property> with more info like, length, null/not-null, etc.
Sample below.
<property name="FullName" column="FullName" length="100" not-null="true" access="field.camelcase-underscore"/>
<property name="LastName" column="LastName" length="100" not-null="true" access="field.camelcase-underscore"/>
<property name="EmailID" column="EmailID" length="100" not-null="true" access="field.camelcase-underscore"/>
<property name="Country" column="Country" length="100" not-null="true" access="field.camelcase-underscore"/>
<property name="PhoneNo" column="PhoneNo" length="100" not-null="false" access="field.camelcase-underscore"/>
<property name="MobileNo" column="MobileNo" length="100" not-null="false" access="field.camelcase-underscore"/>
So, is there any settings or do we need to do this manually?
Cheers.