Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: d6da558d by Tony Chemit at 2024-04-24T09:40:22+02:00 Fix SqlConversions.convertValue method (when modification is an entity) - - - - - 61876197 by Tony Chemit at 2024-04-24T09:44:41+02:00 Impossible de rouvrir une activité PS logbook - Closes #2866 - - - - - 2 changed files: - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityUIModelStates.java - toolkit/persistence/src/main/java/fr/ird/observe/spi/SqlConversions.java Changes: ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityUIModelStates.java ===================================== @@ -80,7 +80,7 @@ public class ActivityUIModelStates extends GeneratedActivityUIModelStates { this.pairingContext = SingletonSupplier.of(() -> { RoutePairingDto data = dataSource.getPsActivityPairingService().getRoutePairingDto(psModule.getCommonTrip().getId(), psModule.getLogbookRoute().getId()); return data == null ? null : new RoutePairingEngine(data); - }); + }, false); getBean().addPropertyChangeListener(evt -> { String propertyName = evt.getPropertyName(); if (!isOpened()) { ===================================== toolkit/persistence/src/main/java/fr/ird/observe/spi/SqlConversions.java ===================================== @@ -77,6 +77,8 @@ public class SqlConversions { String stringValue; if (value == null) { stringValue = "NULL"; + } else if (value instanceof Entity) { + stringValue = SqlHelper.escapeString(((Entity) value).getId()); } else { Class<?> propertyType = sqlModelDescriptorTable.getSimplePropertiesType(propertyName); if (propertyType.equals(String.class)) { View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/250e3419cfa9ef65e7e4cf578... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/250e3419cfa9ef65e7e4cf578... You're receiving this email because of your account on gitlab.com.