Skip to content
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

Feature.USE_TRANSIENT_ANNOTATION does not work with current jackson-data #47

Closed
StefanSos opened this issue Dec 28, 2013 · 4 comments
Closed
Milestone

Comments

@StefanSos
Copy link

since version 2.0 of jackson-data the isIgnorable...() methods of AnnotationIntrospector are replaced with hasIgnoreMarker(). Therefore Feature.USE_TRANSIENT_ANNOTATION does not work.

In class HibernateAnnotationIntrospector the isIgnorable...() methods should be replaced by:

@Override
public boolean hasIgnoreMarker(AnnotatedMember m) {
    return _cfgCheckTransient && m.hasAnnotation(Transient.class);
}
@fnqista
Copy link

fnqista commented Mar 4, 2014

The guy is right. @transient annotations are not ignored during serialization. Can this be fixed?

@fnqista
Copy link

fnqista commented Mar 4, 2014

I created a pull request fixing this issue but I only fixed Hibernate4 module, as I currently only use this version and do not have a test environment for Hibernate3.

@cowtowncoder
Copy link
Member

Fixed as per PR, thanks @ailveen!

@clarkbreyman
Copy link

Tatu - Moving to DW 0.7.1/Jackson 2.3.3 causes @transient properties to be suppressed, even when marked with a @JSONVIEW. I would have expected the JsonView to trump Transient (even though I'm not sure I should be sharing entities between API and persistence). Any recommendations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants