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:
Christian Bauer 2005-02-01 11:59:54 +00:00
parent 1ecef5dce7
commit 5f4697e5a0
1 changed files with 29 additions and 49 deletions

View File

@ -509,17 +509,18 @@
immutable and read-only entity to a given SQL subselect expression:
</para>
<programlisting><![CDATA[<class name="Being" mutable="false">
<programlisting><![CDATA[<class name="Summary">
<subselect>
select id, name as ident, address as loc, 'human' as species from humans
union
select id, ident, planet as loc, species from aliens
select item.name, max(bid.amount), count(*)
from item
join bid on bid.item_id = item.id
group by item.name
</subselect>
<synchronize table="humans"/>
<synchronize table="aliens"/>
...]]></programlisting>
<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
@ -2573,7 +2574,7 @@
</sect2>
<sect2 id="mapping-column" revision="3">
<title>column, formula and subselect elements</title>
<title>column and formula elements</title>
<para>
Any mapping element which accepts a <literal>column</literal> attribute will alternatively
accept a <literal>&lt;column&gt;</literal> subelement. Likewise, <literal>&lt;formula&gt;</literal>
@ -2606,27 +2607,6 @@
<formula>'MAILING'</formula>
</many-to-one>]]></programlisting>
<para>
The <literal>&lt;subselect&gt;</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>
</sect1>