in Education by
I am building a simple Jaxrs api in quarkus. When I call my index method it looks like jackson serializes the objects with the persistent field, that it gets from the PanacheEntityBase. Example: [ { "persistent": true, "id": 1, "createdAt": "2019-03-18", "updatedAt": "2019-03-18" }, { "persistent": true, "id": 2, "createdAt": "2019-03-18", "updatedAt": "2019-03-18" } ] The persistent field isn't saved to the database, but it shows up in the response. I have looked into using @jsonIgnore and jackson mixins, but I would rather not have to do this, especially if this is just a configuration issue. I am curious if Panache should be doing this, or if anyone else is having this problem. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
This happens when we use 3-rd party libraries as returned data type and provide it to Jackson serialisation process. PanacheEntity extends PanacheEntityBase which contains isPersistent method which is treated by Jackson like a POJO getter method. public boolean isPersistent() { return JpaOperations.isPersistent(this); } Jackson automatically takes all get* and is* methods and try to serialise it and include to result JSON. There is no way to configure it on quarkus level. Your solution with JsonIgnore and MixIn feature is good approach.

Related questions

0 votes
    I am working on wordpress with woocommerce and using WCK plugin for custom fields. I am creating products ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    What type of members are not serialized? (a) Private (b) Protected (c) Static (d) Throwable This ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    tKafkaOutput component receives messages serialized into which data type? byte byte[] String[] Integer...
asked Mar 25, 2021 in Technology by JackTerrance
0 votes
    ChatOps is a collaboration model which offers a single and persistent location, for ____________ to collaborate with each other. A ... C. People, Bots and Tools D. People and Bots...
asked Dec 23, 2022 in Technology by JackTerrance
0 votes
    I have a Docker container with MariaDB installed. I am not using any volumes. [vagrant@devops ~]$ sudo ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    I can think of two main benefits: Avoiding concurrency problems, if you have many processes creating/dropping ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    How are Persistent volumes different from the Volumes used by containers (1)they are more Persistent (2)None of these (3)They ... than that of Pods (4)They do not have a lifecycle...
asked Sep 19, 2021 in Education by JackTerrance
0 votes
    What are persistent classes in Hibernate?...
asked Apr 14, 2021 in Technology by JackTerrance
0 votes
    I’ve done my btech in information Technology. What should I study (diploma or post graduation) to get a job in cyber security field? Select the correct answer from above options...
asked Dec 23, 2021 in Education by JackTerrance
0 votes
    Aran is creating a database, he wants to add a field of address, what should be its data type and why. Select the correct answer from above options...
asked Dec 15, 2021 in Education by JackTerrance
0 votes
    Aran is creating a database, he wants to add a field of address, what should be its data type and why. Select the correct answer from above options...
asked Dec 15, 2021 in Education by JackTerrance
0 votes
    Give reason Arain is creating a database be wants to add a field of address what should be it’s data type Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    In the course relation, the title field should throw an error in case of any missing title. The command ... , Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    I use svg to draw soe geographic data. In order to do that i set my viewbox to match a real ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 10, 2022 in Education by JackTerrance
...