Re: Johnzon is going to infinite loop on JPA entities with OneToMany relationship

2018-08-17 Thread Romain Manni-Bucau
You can implement a custom converter/adapter to do that Le ven. 17 août 2018 22:18, Matthew Broadhead a écrit : > is there an annotation which will tell johnzon to return only the id of > the jpa object and not the whole thing? > > On 17/08/18 22:05, Matthew Broadhead wrote: > > no. i will add t

Re: Johnzon is going to infinite loop on JPA entities with OneToMany relationship

2018-08-17 Thread Matthew Broadhead
is there an annotation which will tell johnzon to return only the id of the jpa object and not the whole thing? On 17/08/18 22:05, Matthew Broadhead wrote: no. i will add those and try again. i also changed the entry in system.properties to org.apache.johnzon.deduplicateObjects = true to matc

Re: Johnzon is going to infinite loop on JPA entities with OneToMany relationship

2018-08-17 Thread Matthew Broadhead
no.  i will add those and try again. i also changed the entry in system.properties to org.apache.johnzon.deduplicateObjects = true to match org.apache.johnzon.max-string-length = 8192 On 17/08/18 21:56, Romain Manni-Bucau wrote: Do you have a valid equals/hashcode? Le ven. 17 août 2018 21:

Re: Johnzon is going to infinite loop on JPA entities with OneToMany relationship

2018-08-17 Thread Romain Manni-Bucau
Do you have a valid equals/hashcode? Le ven. 17 août 2018 21:28, chongma a écrit : > i was trying to output some JPA objects to json today. after adding > johnzon.deduplicateObjects = true to system.properties and restarting TomEE > i still get > javax.json.stream.JsonGenerationException: Inval

Re: Johnzon is going to infinite loop on JPA entities with OneToMany relationship

2018-08-17 Thread chongma
i was trying to output some JPA objects to json today. after adding johnzon.deduplicateObjects = true to system.properties and restarting TomEE i still get javax.json.stream.JsonGenerationException: Invalid json at org.apache.johnzon.core.JsonGeneratorImpl.close(JsonGeneratorImpl.java:454)