  <class name="UserCar" table="UserCar">
    <cache usage="read-write" region="ShortTerm" />
    <id name="Id" column="UserID">
      <generator class="foreign">
        <param name="property">Owner</param>
      </generator>
    </id>
    <one-to-one name="Owner" class="User" constrained="true" foreign-key="FK_UserCar_User" />
    <many-to-one name="Brand" class="CarBrand" column="CarBrandID" not-null="true" foreign-key="FK_UserCar_CarBrand" />
    <property name="Model" column="CarModel" length="150" not-null="true" />
    <property name="Comfort" column="CarComfortTypeID" not-null="true" />
    <property name="NumberOfSeats" not-null="true" />
    <property name="RegistrationNumber" length="30" not-null="true" />
    <many-to-one name="Color" column="CarColorID" not-null="true" foreign-key="FK_UserCar_CarColor" />
    <property name="PhotoSmall" lazy="true" /> <!-- lazy="true" -->
    <property name="Photo" column="PhotoOriginal800x600" lazy="true" /> <!-- lazy="true" -->
    <property name="PhotoFileName" />
  </class>
