Hibernate version:3.03
DB Schema
PossibleBuildParam --- CpProfileParam -- Profile
|
|
CpRequestParam -- Request ----------------
*There is also an association between Request and Profile, only forum shows it incorrect when I put it in, due to the spaces
The PossibleBuildparam has an paramId, name, value, allowInRequest etc
The CpProfileParam has paramId, profile, value, allowInRequest
The CpRequestParam has paramId, request, value
In the database the parameters are mostly couple tables, with overruling/additional values. I need a way to subclass possibleparam, with e.g. profile param, but let that subclass ave its own primary key [Profile, paramId]
I have read the documentation, but don't see the light.
Mapping documents:
Code:
<class
name="***PossibleBuildParam"
table="PossibleBuildParams"
>
<id
name="paramId"
type="java.lang.Integer"
column="paramId"
unsaved-value="0"
>
<generator class="identity" />
</id>
<!-- A versioned entity. -->
<version name="objectVersion"
column="objectVersion"
access="org.hibernate.property.DirectPropertyAccessor"
unsaved-value="negative"
/>
<property
name="paramName"
type="java.lang.String"
column="paramName"
not-null="true"
unique="true"
length="25"
/>
<property
name="paramType"
type="java.lang.String"
column="paramType"
length="10"
/>
<property
name="allowInRequest"
type="boolean"
column="allowInRequest"
length="1"
/>
<!-- bi-directional one-to-many association to CpBuildProfileParam -->
<set
name="cpBuildProfileParams"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="paramId" />
</key>
<one-to-many
class="***.model.CpBuildProfileParam"
/>
</set>
Using MSSQL
Help apprieciated
Thanx in advance
[/code]