Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-parent-ws</artifactId>
<version>19</version>
<version>20</version>
<relativePath/>
</parent>

Expand All @@ -32,7 +32,7 @@
</scm>

<properties>
<gridsuite-dependencies.version>31</gridsuite-dependencies.version>
<gridsuite-dependencies.version>32</gridsuite-dependencies.version>
<string-template.version>4.3.1</string-template.version>
<liquibase-hibernate-package>org.gridsuite.mapping.server</liquibase-hibernate-package>
</properties>
Expand Down Expand Up @@ -183,7 +183,7 @@
</dependency>
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<artifactId>wiremock-jetty12</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public AutomatonEntity(MappingEntity mapping, Automaton automaton) {
this.model = automaton.getModel();
this.setGroup = automaton.getSetGroup();
this.properties = automaton.getProperties() != null ? automaton.getProperties().stream()
.map(basicProperty -> new AutomatonPropertyEntity(newID, basicProperty))
.map(basicProperty -> new AutomatonPropertyEntity(newID, basicProperty, this))
.collect(Collectors.toList()) : null;
}

Expand All @@ -73,7 +73,7 @@ public AutomatonEntity(MappingEntity mapping, AutomatonEntity automatonToCopy) {
this.model = automatonToCopy.getModel();
this.setGroup = automatonToCopy.getSetGroup();
this.properties = automatonToCopy.getProperties().stream()
.map(automatonPropertyEntity -> new AutomatonPropertyEntity(newID, automatonPropertyEntity))
.map(automatonPropertyEntity -> new AutomatonPropertyEntity(newID, automatonPropertyEntity, this))
.collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,20 @@ public class AutomatonPropertyEntity implements Serializable {
@MapsId("automatonId")
private AutomatonEntity automaton;

public AutomatonPropertyEntity(UUID automatonId, AutomatonPropertyEntity automatonPropertyEntity) {
public AutomatonPropertyEntity(UUID automatonId, AutomatonPropertyEntity automatonPropertyEntity, AutomatonEntity automaton) {
this.automatonId = automatonId;
this.name = automatonPropertyEntity.getName();
this.type = automatonPropertyEntity.getType();
this.value = automatonPropertyEntity.getValue();
this.automaton = automaton;
}

public AutomatonPropertyEntity(UUID automatonId, BasicProperty basicProperty) {
public AutomatonPropertyEntity(UUID automatonId, BasicProperty basicProperty, AutomatonEntity automaton) {
this.automatonId = automatonId;
this.name = basicProperty.getName();
this.type = basicProperty.getType();
this.value = basicProperty.getValue();
this.automaton = automaton;
}

}
Loading