Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false"
- assembly="MyProject.Domain" namespace="MyProject.Domain">
- <class name="User" table="[User]">
- <id name="Id" column="UserId">
- <generator class="increment" />
- </id>
- <property name="UserName" column="UserName" />
- <property name="Location" />
- <set name="Friends" table="Friend" lazy="false">
- <key column="UserId" />
- <many-to-many class="User" column="FriendId" />
- </set>
- </class>
- </hibernate-mapping>
- public class User
- {
- public virtual int Id { get; set; }
- public virtual string UserName { get; set; }
- public virtual string Location { get; set; }
- public virtual ISet<User> Friends { get; set; }
- }
- <map
- name="propertyName" (1)
- table="table_name" (2)
- schema="schema_name" (3)
- lazy="true|false" (4)
- inverse="true|false" (5)
- cascade="all|none|save-update|delete|all-delete-orphan" (6)
- sort="unsorted|natural|comparatorClass" (7)
- order-by="column_name asc|desc" (8)
- where="arbitrary sql where condition" (9)
- fetch="select|join" (10)
- batch-size="N" (11)
- access="field|property|ClassName" (12)
- >
- <key .... />
- <index .... />
- <element .... />
- </map>
Add Comment
Please, Sign In to add comment