Thanks Gavin,
according to the documentation of Hibernate 3.1 section 7.2, Map (Set and other collection) can be populate with theses attributes:
see: Hibernate 3.1b2 PDF documentation, Page 80.
Code:
<map
name="propertyName" (1)
table="table_name" (2)
schema="schema_name" (3)
lazy="true|extra|false" (4)
inverse="true|false" (5)
cascade="all|none|save-update|delete|all-delete-orphan" (6)
sort="unsorted|natural|comparatorClass" (7)
order-by="column_name asc|desc" (8)
where="arbitrary sql where condition" (9)
fetch="join|select|subselect" (10)
batch-size="N" (11)
access="field|property|ClassName" (12)
optimistic-lock="true|false" (13)
mutable="true|false" (14)
node="element-name|."
embed-xml="true|false"
>
The DTD of Hibernate 3.0.5 and 3.1 (same DTD header in 3.1beta2) shows that theses are the only element for a Set:
Code:
<!ELEMENT set (
meta*,
subselect?,
cache?,
synchronize*,
comment?,
key,
(element|one-to-many|many-to-many|composite-element|many-to-any),
loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,
filter*
)>
<!ATTLIST set name CDATA #REQUIRED>
<!ATTLIST set access CDATA #IMPLIED>
<!ATTLIST set table CDATA #IMPLIED> <!-- default: name -->
<!ATTLIST set schema CDATA #IMPLIED> <!-- default: none -->
<!ATTLIST set catalog CDATA #IMPLIED> <!-- default: none -->
<!ATTLIST set subselect CDATA #IMPLIED>
<!ATTLIST set lazy (true|false|extra) #IMPLIED>
<!ATTLIST set sort CDATA "unsorted"> <!-- unsorted|natural|"comparator class" -->
<!ATTLIST set inverse (true|false) "false">
<!ATTLIST set mutable (true|false) "true">
<!ATTLIST set cascade CDATA #IMPLIED>
<!ATTLIST set order-by CDATA #IMPLIED> <!-- default: none -->
<!ATTLIST set where CDATA #IMPLIED> <!-- default: none -->
<!ATTLIST set batch-size CDATA #IMPLIED>
<!ATTLIST set outer-join (true|false|auto) #IMPLIED>
<!ATTLIST set fetch (join|select|subselect) #IMPLIED>
<!ATTLIST set persister CDATA #IMPLIED>
<!ATTLIST set collection-type CDATA #IMPLIED>
<!ATTLIST set check CDATA #IMPLIED> <!-- default: none -->
<!ATTLIST set optimistic-lock (true|false) "true"> <!-- only supported for properties of a class (not component) -->
<!ATTLIST set node CDATA #IMPLIED>
<!ATTLIST set embed-xml (true|false) "true">
I dont see where I could use the formula Tag. The formula tag is available for properties, many-to-one and one-to-one but not for any <Set> element. Also, the one-to-many element is declared without any sub-tag or formula attribut:
Code:
<!ELEMENT one-to-many EMPTY>
<!ATTLIST one-to-many class CDATA #IMPLIED>
<!ATTLIST one-to-many not-found (exception|ignore) "exception">
<!ATTLIST one-to-many node CDATA #IMPLIED>
<!ATTLIST one-to-many embed-xml (true|false) "true">
<!ATTLIST one-to-many entity-name CDATA #IMPLIED>
Is there an other way to do this? Thanks a lot for helping me, and sorry if I didn't see something obvious,I am still searching to make it work.
regards,
Etienne.