3 Commits
v0.1 ... v0.5

Author SHA1 Message Date
04bf8ffdc6 Fix Jackson reflection errors in GraalVM native image
Some checks failed
Build and Push Docker Image on Tag / Build and Push Docker Image (push) Has been cancelled
2025-02-12 13:46:33 +01:00
1093c0ef56 Remove sentence in README since I fixed the manual workaround 2025-02-07 19:32:42 +01:00
d21a730b2d Fix ugly TODO :) 2025-02-07 19:29:45 +01:00
4 changed files with 35 additions and 6 deletions

View File

@ -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`~~.

View File

@ -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)

View File

@ -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);
}

View File

@ -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
}
]