我提出了以下问题: 我愿通过《普通刑法》从儿童中找回父母。
Parent.hbm.xml
<hibernate-mapping>
<class name="Parent" table="Parent">
<id name="uuid" type="java.lang.String" unsaved-value="null" access="field">
<column name="uuid" not-null="true" />
<generator class="org.hibernate.id.UUIDGenerator" />
</id>
<list name="events" table="ParentToChild" cascade="all-delete-orphan" lazy="false">
<key column="parentUuid" />
<index column="idx" />
<one-to-many class="Child" />
</list>
</class>
<query name="findParentByChild">
<![CDATA[
select p from Parent as p, Child as c where c.uuid = :uuid and p.uuid = c.parentUuid
]]>
</query>
</hibernate-mapping>
Child.hbm.xml
<hibernate-mapping>
<class name="Child" table="Child">
<id name="uuid" type="java.lang.String" access="field">
<column name="uuid" not-null="true" />
<generator class="org.hibernate.id.UUIDGenerator" />
</id>
<other properties..>
</class>
</hibernate-mapping
我可以看到为儿童编制的表格中包含括号,因此,我的问题是,我是如何在波尔图这样做的? 我能否利用总部的外国钥匙?