^1640764605545
@
sname
join
slabel
join
sdescriptors
xworker.lang.MetaDescriptor3
smany
true
seditCols
2
sinitialization
false
sdescription
使用<font face="新宋体">&lt;join&gt;</font> <tt class="literal"><font face="新宋体"><join></join></font></tt>元素，可以将一个类的属性映射到多张表中。<br /><br />此特性常常对遗留数据模型有用，我们推荐表个数比类个数少，以及细粒度的领域模型。然而，在单独的继承树上切换继承映射策略是有用的，后面会解释这点。
sid
join
  @/@inverse
  sname
  inverse
  slabel
  inverse
  sinputtype
  select
  sdefault
  false
  sdescription
  <p>如果打开，Hibernate 不会插入或者更新此连接定义的属性。</p>
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  inverse
    @/@inverse/@true
    sname
    true
    slabel
    true
    svalue
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sid
    true
    @/@inverse/@false
    sname
    false
    slabel
    false
    svalue
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sid
    false
  @/@subselect
  sname
  subselect
  slabel
  subselect
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  subselect
  @/@catalog
  sname
  catalog
  slabel
  catalog
  sdescription
  覆盖由根 <tt class="literal"><font face="新宋体">&lt;hibernate-mapping&gt;</font></tt>元素指定的目录名称。
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  catalog
  @/@optional
  sname
  optional
  slabel
  optional
  sinputtype
  select
  sdefault
  false
  sdescription
  如果打开，Hibernate 只会在此连接定义的属性非空时插入一行数据，并且总是使用一个外连接来得到这些属性。
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  optional
    @/@optional/@true
    sname
    true
    slabel
    true
    svalue
    true
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sid
    true
    @/@optional/@false
    sname
    false
    slabel
    false
    svalue
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sid
    false
  @/@fetch
  sname
  fetch
  slabel
  fetch
  sinputtype
  select
  sdefault
  join
  sdescription
  如果设置为默认值<tt class="literal"><font face="新宋体">join</font></tt>， Hibernate 将使用一个内连接来得到这个类或其超类定义的<tt class="literal"><font face="新宋体">&lt;join&gt;</font></tt>，而使用一个外连接来得到其子类定义的<tt class="literal"><font face="新宋体">&lt;join&gt;</font></tt>。如果设置为<tt class="literal"><font face="新宋体">select</font></tt>，则 Hibernate 将为子类定义的 <tt class="literal"><font face="新宋体">&lt;join&gt;</font></tt>使用顺序选择。这仅在一行数据表示一个子类的对象的时候才会发生。对这个类和其超类定义的<tt class="literal"><font face="新宋体">&lt;join&gt;</font></tt>，依然会使用内连接得到。
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  fetch
    @/@fetch/@join
    sname
    join
    slabel
    join
    svalue
    join
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sid
    join
    @/@fetch/@select
    sname
    select
    slabel
    select
    svalue
    select
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sid
    select
  @/@schema
  sname
  schema
  slabel
  schema
  sdescription
  覆盖由根<tt class="literal"><font face="新宋体">&lt;hibernate-mapping&gt;</font></tt>元素指定的模式名称。
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  schema
  @/@table
  sname
  table
  slabel
  table
  sdescription
  被连接表的名称。
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sid
  table
  @/@subselect1
  sname
  subselect
  slabel
  subselect
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.hibernate.hibernate-mapping-nodes.subselect
  smany
  true
  seditCols
  2
  sinitialization
  false
  sid
  subselect1
  @/@comment
  sname
  comment
  slabel
  comment
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.hibernate.hibernate-mapping-nodes.comment
  smany
  true
  seditCols
  2
  sinitialization
  false
  sid
  comment
  @/@key
  sname
  key
  slabel
  key
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  db.ibernate.hibernate-mapping-nodes.key
  smany
  true
  seditCols
  2
  sinitialization
  false
  sdescription
  我们目前已经见到过<tt class="literal"><font face="新宋体"><key></key></font></tt>元素多次了。 这个元素在父映射元素定义了对新表的连接，并且在被连接表中定义了一个外键引用原表的主键的情况下经常使用。<br /><br />对那些看重删除性能的系统，我们推荐所有的键都应该定义为<tt class="literal"><font face="新宋体">on-delete=&quot;cascade&quot;</font></tt>，这样 Hibernate 将使用数据库级的<tt class="literal"><font face="新宋体">ON CASCADE DELETE</font></tt>约束，而不是多个<tt class="literal"><font face="新宋体">DELETE</font></tt>语句。 注意，这个特性会绕过 Hibernate 通常对版本数据(versioned data)采用的乐观锁策略。 <br /><br /><tt class="literal"><font face="新宋体">not-null</font></tt> 和 <tt class="literal"><font face="新宋体">update</font></tt> 属性在映射单向一对多关联的时候有用。如果你映射一个单向一对多关联到非空的(non-nullable)外键，你<span class="emphasis"><em>必须</em></span> 用<tt class="literal"><font face="新宋体">&lt;key not-null=&quot;true&quot;&gt;</font></tt>定义此键字段。
  sid
  key
  @/@property
  sname
  property
  slabel
  property
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.hibernate.hibernate-mapping-nodes.property
  smany
  true
  seditCols
  2
  sinitialization
  false
  sid
  property
  @/@many-to-one
  sname
  many-to-one
  slabel
  many-to-one
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.hibernate.hibernate-mapping-nodes.many-to-one
  smany
  true
  seditCols
  2
  sinitialization
  false
  sid
  many-to-one
  @/@component
  sname
  component
  slabel
  component
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.hibernate.hibernate-mapping-nodes.component
  smany
  true
  seditCols
  2
  sinitialization
  false
  sdescription
  <font face="新宋体">&lt;component&gt;</font>元素把子对象的一些元素与父类对应的表的一些字段映射起来。 然后组件可以定义它们自己的属性、组件或者集合。参见后面的&ldquo;Components&rdquo;一章。
  sid
  component
  @/@dynamic-component
  sname
  dynamic-component
  slabel
  dynamic-component
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.hibernate.hibernate-mapping-nodes.dynamic-component
  smany
  true
  seditCols
  2
  sinitialization
  false
  sid
  dynamic-component
  @/@any
  sname
  any
  slabel
  any
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.hibernate.hibernate-mapping-nodes.any
  smany
  true
  seditCols
  2
  sinitialization
  false
  sid
  any
  @/@sql-insert
  sname
  sql-insert
  slabel
  sql-insert
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.hibernate.hibernate-mapping-nodes.sql-insert
  smany
  true
  seditCols
  2
  sinitialization
  false
  sid
  sql-insert
  @/@sql-update
  sname
  sql-update
  slabel
  sql-update
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.hibernate.hibernate-mapping-nodes.sql-update
  smany
  true
  seditCols
  2
  sinitialization
  false
  sid
  sql-update
  @/@sql-delete
  sname
  sql-delete
  slabel
  sql-delete
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.hibernate.hibernate-mapping-nodes.sql-delete
  smany
  true
  seditCols
  2
  sinitialization
  false
  sid
  sql-delete
