Redundant docs
git-svn-id: https://svn.jboss.org/repos/hibernate/trunk/Hibernate3/doc@5481 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
1ecef5dce7
commit
5f4697e5a0
|
@ -509,17 +509,18 @@
|
|||
immutable and read-only entity to a given SQL subselect expression:
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[<class name="Being" mutable="false">
|
||||
|
||||
<subselect>
|
||||
select id, name as ident, address as loc, 'human' as species from humans
|
||||
union
|
||||
select id, ident, planet as loc, species from aliens
|
||||
</subselect>
|
||||
|
||||
<synchronize table="humans"/>
|
||||
<synchronize table="aliens"/>
|
||||
...]]></programlisting>
|
||||
<programlisting><![CDATA[<class name="Summary">
|
||||
<subselect>
|
||||
select item.name, max(bid.amount), count(*)
|
||||
from item
|
||||
join bid on bid.item_id = item.id
|
||||
group by item.name
|
||||
</subselect>
|
||||
<synchronize table="item"/>
|
||||
<synchronize table="bid"/>
|
||||
<id name="name"/>
|
||||
...
|
||||
</class>]]></programlisting>
|
||||
|
||||
<para>
|
||||
Declare the tables to synchronize this entity with, ensuring that auto-flush happens
|
||||
|
@ -2572,15 +2573,15 @@
|
|||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="mapping-column" revision="3">
|
||||
<title>column, formula and subselect elements</title>
|
||||
<para>
|
||||
Any mapping element which accepts a <literal>column</literal> attribute will alternatively
|
||||
accept a <literal><column></literal> subelement. Likewise, <literal><formula></literal>
|
||||
is an alternative to the <literal>formula</literal> attribute.
|
||||
</para>
|
||||
<sect2 id="mapping-column" revision="3">
|
||||
<title>column and formula elements</title>
|
||||
<para>
|
||||
Any mapping element which accepts a <literal>column</literal> attribute will alternatively
|
||||
accept a <literal><column></literal> subelement. Likewise, <literal><formula></literal>
|
||||
is an alternative to the <literal>formula</literal> attribute.
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[<column
|
||||
<programlisting><![CDATA[<column
|
||||
name="column_name"
|
||||
length="N"
|
||||
precision="N"
|
||||
|
@ -2592,42 +2593,21 @@
|
|||
sql-type="sql_type_name"
|
||||
check="SQL expression"/>]]></programlisting>
|
||||
|
||||
<programlisting><![CDATA[<formula>SQL expression</formula>]]></programlisting>
|
||||
<programlisting><![CDATA[<formula>SQL expression</formula>]]></programlisting>
|
||||
|
||||
<para>
|
||||
<literal>column</literal> and <literal>formula</literal> attributes may even be combined
|
||||
within the same property or association mapping to express, for example, exotic join
|
||||
conditions.
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[<many-to-one name="homeAddress" class="Address"
|
||||
<para>
|
||||
<literal>column</literal> and <literal>formula</literal> attributes may even be combined
|
||||
within the same property or association mapping to express, for example, exotic join
|
||||
conditions.
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[<many-to-one name="homeAddress" class="Address"
|
||||
insert="false" update="false">
|
||||
<column name="person_id" not-null="true" length="10"/>
|
||||
<formula>'MAILING'</formula>
|
||||
</many-to-one>]]></programlisting>
|
||||
|
||||
<para>
|
||||
The <literal><subselect></literal> element is an alternative to the
|
||||
<literal>subselect</literal> attribute, and lets you map an entity class to
|
||||
the result set of some query. (This is useful if you can't define a view, for
|
||||
some reason.)
|
||||
</para>
|
||||
|
||||
<programlisting><![CDATA[<class name="Summary">
|
||||
<subselect>
|
||||
select item.name, max(bid.amount), count(*)
|
||||
from item
|
||||
join bid on bid.item_id = item.id
|
||||
group by item.name
|
||||
</subselect>
|
||||
<synchronize table="item"/>
|
||||
<synchronize table="bid"/>
|
||||
<id name="name"/>
|
||||
...
|
||||
</class>]]></programlisting>
|
||||
|
||||
|
||||
</sect2>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
|
Loading…
Reference in New Issue