Hello, using the 30th of june Power nightly.
In some cases, when I update a grid, the recodr that was updated is removed from the listgrid (not from database, so update succeeds). (myqsl btw)
Then I get this error:
The following was sent to the server:
.ds.xml
grid init code:
Am I doing something wrong here? Why, upon save, is the record removed from the grid (visually only)?
I don't really get the error message...
In some cases, when I update a grid, the recodr that was updated is removed from the listgrid (not from database, so update succeeds). (myqsl btw)
Then I get this error:
Code:
[ERROR] [generatedcode] - 17:32:01.509:XRP8:WARN:ResultSet:isc_ResultSet_29 (created by: isc_ListGrid_9):Update operation - submitted record with primary key value[s]:{presence_id: 19} returned with modified primary key:[Obj ]. This may indicate bad server logic. Updating cache to reflect new primary key. [ERROR] [generatedcode] - 17:32:07.101:XRP1:WARN:Log:findByKeys: passed record does not have a value for key field 'presence_id'
Code:
criteria:{ presence_id:17 }, values:{ presence_id:17, status:"onverwerkt" }, operationConfig:{ dataSource:"Lecture_presence_Student", operationType:"update" }, componentId:"isc_ListGrid_9", appID:"builtinApplication", operation:"Lecture_presence_Student_update", oldValues:{ ... *snip* } }
Code:
<?xml version="1.0" encoding="UTF-8"?> <DataSource ID="Lecture_presence_Student" serverType="sql" tableName="Lecture_presence_Student"> <fields> <field name="presence_id" type="sequence" primaryKey="true"/> <field name="Lecture_id" type="integer" foreignKey="Lecture.Lecture_id"/> <field name="Student_id" type="integer" foreignKey="Student.Student_id"/> <field name="status" type="enum" required="true"> <valueMap> <value>onverwerkt</value> <value>aanwezig</value> <value>afwezig</value> </valueMap> </field> <field name="reason" type="text" length="255" /> </fields> <operationBindings> *snip* </operationBindings> </DataSource>
Code:
grid.setDataSource(presenceDs); grid.setAlternateRecordStyles(true); grid.setCellHeight(22); grid.setAutoFetchData(false); grid.setCanEdit(true); grid.setCanRemoveRecords(false); grid.setHeight("100%"); ListGridField id = new ListGridField("presence_id", "id"); ListGridField first = new ListGridField("firstname", "Voornaam"); first.setCanEdit(false); ListGridField tussenvoegsel = new ListGridField("tussenvoegsel", "Tussenvgsl"); tussenvoegsel.setCanEdit(false); ListGridField surname = new ListGridField("surname", "Achternaam"); surname.setCanEdit(false); ListGridField status = new ListGridField("status","Status"); ListGridField reason = new ListGridField("reason", "Reden"); grid.setFields(id,first,tussenvoegsel,surname,status,reason); Criteria c = new Criteria(); c.setAttribute("Lecture_id", lectureRec.getAttribute("Lecture_id")); grid.fetchData(c); grid.hideField("presence_id"); addMember(grid);
I don't really get the error message...
Comment