vgquotes/Src/VideoGameQuotes.Api/Mappings/Game.hbm.xml

26 lines
1.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="VideoGameQuotes.Api" namespace="VideoGameQuotes.Api">
<class name="Game" table="game">
<id column="game_id" name="Id" type="int">
<generator class="identity" />
</id>
<property name="Name" column="game_name" not-null="true" length="255"/>
<property name="Website" column="website" not-null="false" length="255"/>
<property name="Created" column="created" not-null="true" />
<property name="Screenshot" column="screenshot" not-null="false" length="10240" />
<property name="Region" column="game_region" not-null="true" />
<many-to-one name="Creator" column="creator" not-null="true" foreign-key="fk_game_user"/>
<set access="nosetter.camelcase" name="Systems" table="game_system_map" cascade="save-update">
<key column="game_id" />
<many-to-many class="VideoGameQuotes.Api.GamingSystem" column="system_id" />
</set>
<set access="nosetter.camelcase" name="Publishers" table="game_publisher_map" cascade="save-update">
<key column="game_id" />
<many-to-many class="VideoGameQuotes.Api.Publisher" column="publisher_id" />
</set>
</class>
</hibernate-mapping>