<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
		"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.ntsky.bbs.domain">
	<class name="Poll" table="ntsky_t_poll" lazy="false">
        <id name="id" column="id">
			<generator class="increment"/>
        </id>
		<property name="topicId" column="topic_id" not-null="true"/>
		<property name="content" column="content" not-null="true"/>
		<property name="dateCreated" column="date_created" not-null="true"/>
	
		<set name="pollResults" table="ntsky_t_poll_result" order-by="id asc" lazy="false" inverse="true"> 
            <key column="poll_id"/> 
            <one-to-many class="PollResult"/> 
        </set>
	
	</class>
</hibernate-mapping>
