-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite recursion due to @JsonIgnoreProperties
not applicable to List
valued property
#70
Comments
I believe that solving the problem is to make the class HibernateProxySerializer implement the ContextualSerializer interface. This way you can have accesso to BeanProperty in serialize method. |
+1 |
What would be useful here is a self-contained unit test. |
@JsonIgnoreProperties
not applicable to List
valued property
@cowtowncoder He came to look at my suggestion to fix this issue #82 ? I try to see the other way if you do not find a valid solution. |
@peruzzo Thanks -- I'll have a look at this now. |
@cowtowncoder Thanks! 😃 |
I have a stackoverflow problem, but it occurs only depending on the entity that initialize first.
This block below works perfectly with the expected return: {"numeroContrato":"101-6861944","parcelas":[{"numeroParcela":3}],"liquidacoes":[{"valorTotal":91548.00,"parcela":{"numeroParcela":3}}]}
But that other code block, where I changed the boot order of the relationship I have a stackoverflow.
Exception in thread "main" com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: teste.jackson.Contrato["parcelas"]->org.hibernate.collection.internal.PersistentBag[0]->teste.jackson.Parcela["contrato"]->teste.jackson.Contrato["parcelas"]->org.hibernate.collection.internal.PersistentBag[0]->teste.jackson.Parcela["contrato"]->teste.jackson.Contrato["parcelas"]->org.hibernate.collection.internal.PersistentBag[0]->teste.jackson.Parcela["contrato"]->teste.jackson.Contrato["parcelas"]->org.hibernate.collection.internal.PersistentBag[0] ...
The text was updated successfully, but these errors were encountered: