I use a Hibernate datasource with a table that has a composite primary key. I've set the idClassName and data is correctly queried with autoDeriveSchame="true". However, If I want to mark the primary key fields as hidden="true", what name do I use when referring to them in the fields list? Here's my ds.xml:
From the dev console, I see the IDs in the response look like:
If I call out either "id_openingId" or "id_tagId" as fields, they no longer get returned in the response. What name am I supposed to use for these fields?
Code:
<DataSource ID="OpeningTag"
serverType="hibernate"
beanClassName="com.assaabloy.protech.domain.OpeningTag"
idClassName="com.assaabloy.protech.domain.OpeningTagId"
autoDeriveSchema="true"
dropExtraFields="true"
configBean="protechSessionFactory"
xmlns:fmt="WEB-INF/">
</DataSource>
Code:
{
data:[
{
id_openingId: 2,
id_tagId: 2
}
],
}
Comment