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

26 lines
1.1 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="Icon" column="icon" not-null="false" length="1024" />
<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">
<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">
<key column="game_id" />
<many-to-many class="VideoGameQuotes.Api.Publisher" column="publisher_id" />
</set>
</class>
</hibernate-mapping>