>
> Thanks
>
> Travers
>
> //// parent class
>
> * @struts.form include-all="true" extends="BaseForm"
>
> * @hibernate.class table="qc_query_control"
>
> */
>
> public class QueryControl extends BaseObject implements Serializable {
>
> private static final long serialVersionUID = 3832626166523359411L;
>
>
>
> protected Long id;
>
> < and rest of attributes>
>
> protected Set queryParameters = new HashSet(); // one to many
> relationship
>
>
>
> < then the getter for queryParameters>
>
> * @hibernate.set table = qp_query_parameter
> cascade="all-delete-orphan" role="oneToMany" lazy="false"
>
> * @hibernate.collection-key column="qp_qc_uid"
>
> * @hibernate.collection-one-to-many
> class="cam.model.QueryParameter"
>
> */
>
> public Set getQueryParameters() {
>
> return queryParameters;
>
> }
>
>
I think this :
[code]
/**
* @hibernate.set lazy="true" inverse="true" cascade="none"
* @hibernate.collection-key column="cdprograma"
* @hibernate.collection-key column="cdcapacitacao"
* @hibernate.collection-one-to-many
class="to.gov.secad.scc.model.CapacitacaoOrgao"
*
*/
public Set getCapacitacaoOrgaos() {
return this.capacitacaoOrgaos;
}
[/code]
would be better!
You need tell hibernate where all the keys are.
>
> // Then the child class
>
> * @struts.form include-all="false" extends="BaseForm"
>
> * @hibernate.class table="qp_query_parameter"
>
> */
>
> public class QueryParameter extends BaseObject implements Serializable {
>
> private static final long serialVersionUID = 3690147920654049848L;
>
> protected QueryParameterPK id;
>
> protected String qpMatchType;
>
> protected Long qpUserId;
>
> protected QueryControl queryControl;
I would add a version field here. When working with composite keys
always use versioning columns.
Gilberto
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]