Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
04bf8ffdc6
|
|||
1093c0ef56
|
|||
d21a730b2d
|
@ -99,5 +99,5 @@ the operation (`op`), the path (`path`) to apply it to and the new value
|
||||
A lot more tests. Integration tests, fuzz tests and benchmarks are those that come
|
||||
to mind.
|
||||
|
||||
I would also spend a lot more time understanding cyclic dependencies when (de)serializing
|
||||
JSON. For now there's a manual workaround in `SigningRequestDocumentServiceImpl.java`.
|
||||
~~I would also spend a lot more time understanding cyclic dependencies when (de)serializing
|
||||
JSON. For now there's a manual workaround in `SigningRequestDocumentServiceImpl.java`~~.
|
@ -1,6 +1,7 @@
|
||||
package ch.dlmw.swisssignchallenge.entities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
||||
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@ -11,6 +12,7 @@ import java.util.UUID;
|
||||
@Table(name = "signing_request_document")
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id")
|
||||
public class SigningRequestDocument {
|
||||
@Id
|
||||
@GeneratedValue(generator = "UUID")
|
||||
@ -19,7 +21,6 @@ public class SigningRequestDocument {
|
||||
|
||||
@ManyToOne(fetch = FetchType.EAGER)
|
||||
@JoinColumn(name = "signing_request_id", nullable = false)
|
||||
@JsonIgnore
|
||||
private SigningRequest signingRequest;
|
||||
|
||||
@Column(name = "name", nullable = false)
|
||||
|
@ -15,8 +15,6 @@ public class SigningRequestDocumentServiceImpl implements SigningRequestDocument
|
||||
|
||||
@Override
|
||||
public void updateSigningRequestDocument(SigningRequestDocument signingRequestDocument) {
|
||||
var document = signingRequestDocumentRepository.findById(signingRequestDocument.getId()).orElseThrow();
|
||||
signingRequestDocument.setSigningRequest(document.getSigningRequest()); // todo: this is a bit ugly.. due to recursion the relationship is ignored so I set it manually
|
||||
signingRequestDocumentRepository.save(signingRequestDocument);
|
||||
}
|
||||
|
||||
|
@ -18,5 +18,35 @@
|
||||
"allDeclaredConstructors": true,
|
||||
"allPublicConstructors": true,
|
||||
"unsafeAllocated": true
|
||||
},
|
||||
{
|
||||
"name": "com.github.fge.jsonpatch.JsonPatchMessages",
|
||||
"allDeclaredConstructors": true
|
||||
},
|
||||
{
|
||||
"name": "com.github.fge.jsonpatch.JsonPatch",
|
||||
"allDeclaredMethods": true,
|
||||
"allDeclaredConstructors": true
|
||||
},
|
||||
{
|
||||
"name": "com.github.fge.msgsimple.load.MessageBundles",
|
||||
"allDeclaredMethods": true,
|
||||
"allDeclaredConstructors": true
|
||||
},
|
||||
{
|
||||
"name": "com.github.fge.jsonpatch.ReplaceOperation",
|
||||
"allDeclaredConstructors": true,
|
||||
"allDeclaredMethods": true,
|
||||
"allDeclaredFields": true
|
||||
},
|
||||
{
|
||||
"name": "com.github.fge.jackson.jsonpointer.JsonPointer",
|
||||
"allDeclaredConstructors": true,
|
||||
"allDeclaredMethods": true,
|
||||
"allDeclaredFields": true
|
||||
},
|
||||
{
|
||||
"name": "com.github.fge.jackson.jsonpointer.JsonPointerMessages",
|
||||
"allDeclaredConstructors": true
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user