constrained (optional) specifies that a foreign key constraint on the primary key of the mapped table references the table of the associated class. This option affects the order in which save() and delete() are cascaded, and determines whether the association may be proxied (it is also used by the schema export tool).
<one-to-one name="idCard" constrained="true" cascade="none" />constrained="true"是指,你的person的id是由IdCard生成的。
也就是说。IdCard要先于你的Person存在了。
所以会先保存IDCard,然后才保存Person