Advertisement
Guest User

Untitled

a guest
May 2nd, 2016
82
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE hibernate-mapping PUBLIC
  3. "-//Hibernate/Hibernate Mapping DTD//EN"
  4. "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
  5.  
  6. <hibernate-mapping>
  7. <class name="ru.lesson.models.users.User" table="users">
  8. <meta attribute="class-description">
  9. This class contains the user detail.
  10. </meta>
  11. <id name="id" type="int" column="uid">
  12. <generator class="identity"/>
  13. </id>
  14. <property name="login" column="login" type="string"/>
  15. <property name="email" column="email" type="string"/>
  16. <property name="password" column="password" type="string"/>
  17. <property name="name" column="name" type="string"/>
  18. <property name="surname" column="surname" type="string"/>
  19. <property name="fullname" column="fullname" type="string"/>
  20. <property name="sex" column="sex" type="string"/>
  21. <property name="phone_number" column="phone_number" type="string"/>
  22. <property name="city" column="city" type="string"/>
  23. <many-to-one name="role" lazy="false" column="role_id" class="ru.lesson.models.users.Role" cascade="save-update"/>
  24. <bag name="messages" table="messages" lazy="false" inverse="true" cascade="all">
  25. <key column="user_id" not-null="true"/>
  26. <key column="sender_id" not-null="true"/>
  27. <one-to-many class="ru.lesson.models.users.Message"/>
  28. </bag>
  29. </class>
  30. </hibernate-mapping>
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement