Hello,
We experience a strange behavior with JUnit and Smart GWT. ( ISCInit - Isomorphic SmartClient/SmartGWT Framework (v10.0p_2015-10-21/PowerEdition Deployment 2015-10-21))
(browser: IE10)
Here is the test case we are doing.
The applicant is already stored in the database, and I try to modify the name of the applicant using a DsRequest.
The test works if in the datasource description do not have any foreign key declaration. But once I declare the relation from the applicant to his price model the test case fails and the return data are not the same. (the foreign key declaration follow the following : http://www.smartclient.com/smartgwte...anyToOneSimple)
Furthermore, when it fails the return applicant is not modified. Therefore, even if I modify the test case, it will always fails.
Here are the the data source description that works:
Here are the the data source description that fails:
Find in attachment the full log in next post.
Find also in attachement the full project in next post
Thank you in advance for your help,
Kind regards,
Samuel
We experience a strange behavior with JUnit and Smart GWT. ( ISCInit - Isomorphic SmartClient/SmartGWT Framework (v10.0p_2015-10-21/PowerEdition Deployment 2015-10-21))
(browser: IE10)
Here is the test case we are doing.
Code:
[USER="8560"]test[/USER] [B]public void [/B]testRequest() [B]throws [/B]Exception { DSRequest dsRequest = [B]new [/B]DSRequest([B]"applicant"[/B], [B]"update"[/B]); String newName = [B]"Wiii"[/B]; dsRequest.setCriteria([B]"id"[/B], [B]applicantId[/B]); dsRequest.setFieldValue([B]"name"[/B], newName); DSResponse dsResponse = dsRequest.execute(); Applicant applicant = ((Applicant) ((ArrayList) dsResponse.getData()).get(0)); Assert.[I]assertEquals[/I](newName, applicant.getName()); }
The test works if in the datasource description do not have any foreign key declaration. But once I declare the relation from the applicant to his price model the test case fails and the return data are not the same. (the foreign key declaration follow the following : http://www.smartclient.com/smartgwte...anyToOneSimple)
Furthermore, when it fails the return applicant is not modified. Therefore, even if I modify the test case, it will always fails.
Here are the the data source description that works:
Code:
<[B]DataSource [/B][B]xmlns:[/B][B]xsi[/B][B]="http://www.w3.org/2001/XMLSchema-instance" [/B][B]ID[/B][B]="applicant" [/B][B]serverConstructor[/B][B]="com.isomorphic.jpa.JPA2DataSource" [/B][B]beanClassName[/B][B]="com.smartgwt.sample.server.dataModel.Applicant" [/B][B]autoDeriveSchema[/B][B]="false" [/B][B]xsi[/B][B]:noNamespaceSchemaLocation[/B][B]='datasourceValidator.xsd'[/B]> <[B]fields[/B]> <[B]field [/B][B]primaryKey[/B][B]="true" [/B][B]name[/B][B]="id" [/B][B]type[/B][B]="sequence" [/B][B]canEdit[/B][B]="false" [/B][B]canFilter[/B][B]="false" [/B][B]hidden[/B][B]="true"[/B]/> <[B]field [/B][B]name[/B][B]="name" [/B][B]title[/B][B]="Name" [/B][B]type[/B][B]="text" [/B][B]width[/B][B]="*"[/B]/> <[B]field [/B][B]name[/B][B]="jobNumber" [/B][B]title[/B][B]="Job Number" [/B][B]type[/B][B]="text" [/B][B]width[/B][B]="*" [/B]/> <[B]field [/B][B]name[/B][B]="prorationRate" [/B][B]title[/B][B]="Proration rate (in %)" [/B][B]type[/B][B]="integer" [/B][B]width[/B][B]="*"[/B]/> </[B]fields[/B]> </[B]DataSource[/B]>
Code:
<[B]DataSource [/B][B]xmlns:[/B][B]xsi[/B][B]="http://www.w3.org/2001/XMLSchema-instance" [/B][B]ID[/B][B]="applicant" [/B][B]serverConstructor[/B][B]="com.isomorphic.jpa.JPA2DataSource" [/B][B]beanClassName[/B][B]="com.smartgwt.sample.server.dataModel.Applicant" [/B][B]autoDeriveSchema[/B][B]="false" [/B][B]xsi[/B][B]:noNamespaceSchemaLocation[/B][B]='datasourceValidator.xsd'[/B]> <[B]fields[/B]> <[B]field [/B][B]primaryKey[/B][B]="true" [/B][B]name[/B][B]="id" [/B][B]type[/B][B]="sequence" [/B][B]canEdit[/B][B]="false" [/B][B]canFilter[/B][B]="false" [/B][B]hidden[/B][B]="true"[/B]/> <[B]field [/B][B]name[/B][B]="name" [/B][B]title[/B][B]="Name" [/B][B]type[/B][B]="text" [/B][B]width[/B][B]="*"[/B]/> <[B]field [/B][B]name[/B][B]="jobNumber" [/B][B]title[/B][B]="Job Number" [/B][B]type[/B][B]="text" [/B][B]width[/B][B]="*" [/B]/> <[B]field [/B][B]name[/B][B]="prorationRate" [/B][B]title[/B][B]="Proration rate (in %)" [/B][B]type[/B][B]="integer" [/B][B]width[/B][B]="*"[/B]/> <[B]field [/B][B]name[/B][B]="priceModelName" [/B][B]hidden[/B][B]="true" [/B][B]includeFrom[/B][B]="priceModel.priceModelName"[/B]/> <[B]field [/B][B]name[/B][B]="priceModel" [/B][B]title[/B][B]="Price Model" [/B][B]canEdit[/B][B]="true" [/B][B]displayField[/B][B]="priceModelName" [/B][B]foreignKey[/B][B]="priceModel.id" [/B]/> </[B]fields[/B]> </[B]DataSource[/B]>
Find also in attachement the full project in next post
Thank you in advance for your help,
Kind regards,
Samuel
Comment