Hello,
I receive an error while including two fields from the same datasource.
WARN DataSource - Couldn't get value at valueXPath: shipFrom/name for datasource: order_DataSource - ignoring. Actual error: org.apache.commons.jxpath.JXPathNotFoundException: No value for xpath: shipFrom/name
The value for both the included fields is not shown.
Datasource is:
while the classese are JPA mapped pojos like:
BTW: if i comment out the "shipFrom" definition (NULL in the database) in OrderHeader datasource the remaining field shipTo is correctly shown.
How should the datasource be defined?
THank you!
Using smargwtee 3.1p
Any browser
I receive an error while including two fields from the same datasource.
WARN DataSource - Couldn't get value at valueXPath: shipFrom/name for datasource: order_DataSource - ignoring. Actual error: org.apache.commons.jxpath.JXPathNotFoundException: No value for xpath: shipFrom/name
The value for both the included fields is not shown.
Datasource is:
Code:
<DataSource ID="order_DataSource" serverType="jpa" serverContructor="com.isomorphic.jpa.JPA2DataSource" schemaBean="com.realanywhere.domain.OrderHeader" autoDeriveSchema="true"> <fields> <field name="id" hidden="true" type="sequence" primaryKey="true" /> <field name="shipToName" includeFrom="stakeholder_DataSource.name"/> <field name="shipTo" foreignKey="stakeholder_DataSource.id" /> <field name="shipFromName" includeFrom="stakeholder_DataSource.name"/> <field name="shipFrom" foreignKey="stakeholder_DataSource.id" /> ... </fields> </Datasource>
Code:
public class OrderHeader { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private Long id; String orderNumber; @ManyToOne(fetch = FetchType.LAZY) Stakeholder shipTo; @ManyToOne(fetch = FetchType.LAZY) Stakeholder shipFrom; ...
Code:
public class Stakeholder { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private Long id; String name; ... }
How should the datasource be defined?
THank you!
Using smargwtee 3.1p
Any browser
Comment