Hi folks,
I am sort of stuck when using the JDO object store. I basically have 2
issues that I need to resolve.
Issue 1: UUID and DateTime are not stored
------------------------------------------
When creating a new Report (without any statuses) the timestamp and
uuid are automatically generated. So on initial create there are no
edit fields for these 2 properties as expected. Pressing 'Ok' stores
the information in the database and shows the details view where both
fields are shown with proper data.
However when retrieving the same record from the database both these
fields are shown empty.
What could have caused this behaviour (where do I have to look)?
Do I have to do something special to get these values to be stored as well?
Issue 2: Statusses are not attached to report
---------------------------------------------
I have troubles adding a status to the report. When looking in the
database I find tables for both Report and Status. But I can not find
any relation between both tables.
I am probably overlooking something but I can't figure out what?
Model:
------
class Report {
UUID uuid;
DateTime timestamp // Isis DateTime
String reporter;
String reason;
List<Status> statuses;
}
class Status {
DateTime timestamp // Isis DateTime
String remark;
Integer statusValue;
}
- For UUID I created a ValueSemanticsProvider. The value is shown
properly on screen.
- The ReportRepository contains methods for creating a new Report and
searching for reports.
- Statuses are created through Report.addStatus() looking something like this:
public void addStatus( @Named("Partij") Integer partij,
@Named("Duider") String duider,
@Named("Status") Integer status,
@Named("Toelichting") String toelichting) {
final Status statusObject = newTransientInstance(Status.class);
statusObject.set...
statuses.add(statusObject); // Shouldn't 'this' be saved as well?
persist(statusObject);
}
Environment:
------------
0.3.1-SNAPSHOT
JDO objectstore on postgresql
Html viewer
Any help is greatly appreciated.
Regards,
Minto