Hi Andrus,
Thanks for digging into this.
I'm using Agrest 4.9 at the moment, maybe I should try with 5.x.
Checking the queries generated, everything looks fine. I ran those queries against the DB and the results are there. The logs show the number of rows returned.
PK and FK are in Oracle and Cayenne modeler both NUMBER(10,0), Integer for the Java type.
thanks again,
anthonin
Here are the logs:
16:01:46.698 [qtp300804223-27] DEBUG io.agrest.cayenne.compiler.CayenneAgEntityCompiler - compiling Cayenne entity for type: class org.oceanops.api.orm.Ptf
16:01:46.721 [qtp300804223-27] DEBUG io.agrest.cayenne.compiler.CayenneAgEntityCompiler - compiling Cayenne entity for type: class org.oceanops.api.orm.PtfVariable
16:01:46.723 [qtp300804223-27] DEBUG io.agrest.cayenne.compiler.CayenneAgEntityCompiler - compiling Cayenne entity for type: class org.oceanops.api.orm.SensorModel
16:01:46.723 [qtp300804223-27] DEBUG io.agrest.cayenne.compiler.CayenneAgEntityCompiler - compiling Cayenne entity for type: class org.oceanops.api.orm.SensorModelSensorType
16:01:46.724 [qtp300804223-27] DEBUG io.agrest.cayenne.compiler.CayenneAgEntityCompiler - compiling Cayenne entity for type: class org.oceanops.api.orm.SensorType
16:01:47.380 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - --- transaction started.
16:01:47.461 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - SELECT t0.ACTIVITY_CRITERION, t0.BATCH_REQUEST_REF, t0.CLOSURE_CRITERION, t0.DATA_URL, t0.DELETE_TAG, t0.DESCRIPTION, t0.E_NOTIFICATION_DATE, t0.ENDING_DATE, t0.ID, t0.INSERT_DATE, t0.LAST_UPDATE, t0.METADATA_AVAILABLE, t0.NAME, t0.NOK_REASON, t0.REF, t0.REF_PARENT, t0.UPDATE_DATE, t0.VALIDATED, t0.WIGOS_SYNCHRONISED, t0.BACKUP_TELECOM_ID, t0.BACKUP_TRACKING_SYSTEM_ID, t0.DATA_STATUS_ID, t0.DOC_ID, t0.ENDING_CAUSE_ID, t0.LAST_LOC_ID, t0.LATEST_OBS_ID, t0.PROGRAM_ID, t0.PTF_AUTOMATION_ID, t0.PTF_BATCH_STATUS_ID, t0.PTF_DEPL_ID, t0.PTF_HARDWARE_ID, t0.PTF_IDENTIFIERS_ID, t0.PTF_MODEL_ID, t0.PTF_SOFTWARE_ID, t0.PTF_STATUS_ID, t0.RETRIEVAL_ID, t0.SERVICE_SCHEDULE_ID, t0.TELECOM_ID, t0.TRACKING_SYSTEM_ID FROM OCEANOPS.PTF t0 WHERE t0.ID = ? [bind: 1->ID:1026308]
16:01:47.752 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - === returned 1 row. - took 367 ms.
16:01:47.785 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - +++ transaction committed.
16:01:48.188 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - --- transaction started.
16:01:48.198 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - SELECT t0.ACCURACY, t0.AVERAGING_METHOD, t0.AVERAGING_PERIOD, t0.CALIB_DATE, t0.CALIB_DATE_NEXT, t0.COMMENTS, t0.CONTROL_SCHEDULE, t0.DISTANCE_X, t0.DISTANCE_Y, t0.END_DATE, t0.FIRST_MEASURED, t0.HEIGHT, t0.HEIGHT_SECONDARY_REF_LEVEL, t0.ID, t0.LAST_MEASURED, t0.MANUF_DATE, t0.NB_OBS, t0.OWNERSHIP, t0.PACKAGE_N, t0.PRECISION, t0.RANGE, t0.RESOLUTION, t0.SAMPLING_RATE, t0.SAMPLING_RATE_TOTAL, t0.SERIAL_NO, t0.SIDE_INDICATOR, t0.START_DATE, t0.TIME_OFFSET, t0.VARIABLE_ID, t0.DATA_PROCESSING_METHOD_ID, t0.MANUF_WEBLINK_ID, t0.PROGRAM_ID, t0.PTF_ID, t0.SENSOR_EXPOSURE_ID, t0.SENSOR_LOCATION_ID, t0.SENSOR_MODEL_ID, t0.SENSOR_STATUS_ID, t0.SERVICE_SCHEDULE_ID, t0.WEBLINK_ID, t1.ID FROM OCEANOPS.PTF_VARIABLE t0 JOIN OCEANOPS.PTF t1 ON t0.PTF_ID = t1.ID WHERE t1.ID = ? [bind: 1->ID:1026308]
16:01:48.259 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - === returned 5 rows. - took 71 ms.
16:01:48.292 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - +++ transaction committed.
16:01:48.767 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - --- transaction started.
16:01:48.769 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - SELECT t0.AXES_NO, t0.BODC_ID, t0.CALIB_FREQUENCY, t0.DESCRIPTION, t0.ID, t0.NAME, t0.NAME_LONG, t0.NAME_SHORT, t0.ORIGINAL_DATASET, t0.SPEC, t0.YEARLY_DRIFT, t0.AGENCY_ID, t0.IMAGE_ID, t0.WEBLINK_ID, t1.ID FROM OCEANOPS.SENSOR_MODEL t0 JOIN OCEANOPS.PTF_VARIABLE t1 ON t0.ID = t1.SENSOR_MODEL_ID JOIN OCEANOPS.PTF t2 ON t1.PTF_ID = t2.ID WHERE t2.ID = ? [bind: 1->ID:1026308]
16:01:48.857 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - === returned 2 rows. - took 89 ms.
16:01:48.888 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - +++ transaction committed.
16:01:49.271 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - --- transaction started.
16:01:49.278 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - SELECT DISTINCT t0.ACCURACY, t0.PRECISION, t0.RANGE, t0.RESOLUTION, t0.SENSOR_MODEL_ID, t0.SENSOR_TYPE_ID, t0.UNIT, t1.ID FROM OCEANOPS.SENSOR_MODEL_SENSOR_TYPE t0 JOIN OCEANOPS.SENSOR_MODEL t1 ON t0.SENSOR_MODEL_ID = t1.ID JOIN OCEANOPS.PTF_VARIABLE t2 ON t1.ID = t2.SENSOR_MODEL_ID JOIN OCEANOPS.PTF t3 ON t2.PTF_ID = t3.ID WHERE t3.ID = ?
[bind: 1->ID:1026308]
16:01:49.338 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - === returned 2 rows. - took 66 ms.
16:01:49.370 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - +++ transaction committed.
16:01:49.747 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - --- transaction started.
16:01:49.752 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - SELECT DISTINCT t0.DESCRIPTION, t0.ID, t0.NAME, t0.NAME_SHORT, t0.PUB47_REF, t0.WIGOS_CODE, t0.SENSOR_FAMILY_ID, t0.VARIABLE_ID, t1.SENSOR_MODEL_ID, t1.SENSOR_TYPE_ID FROM OCEANOPS.SENSOR_TYPE t0 JOIN OCEANOPS.SENSOR_MODEL_SENSOR_TYPE t1 ON t0.ID = t1.SENSOR_TYPE_ID JOIN OCEANOPS.SENSOR_MODEL t2 ON t1.SENSOR_MODEL_ID = t2.ID JOIN OCEANOPS.PTF_VARIABLE t3 ON t2.ID = t3.SENSOR_MODEL_ID JOIN OCEANOPS.PTF t4 ON t3.PTF_ID = t4.ID WHERE t4.ID = ? [bind: 1->ID:1026308]
16:01:49.808 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - === returned 2 rows. - took 59 ms.
16:01:49.839 [qtp300804223-27] INFO org.apache.cayenne.log.JdbcEventLogger - +++ transaction committed.
and the results in the browser (underlined is where the issue happens):