jersey/jersey — pull request #99 by athieriot (2014-08-18 13:22:45+00:00)
Title: Proposal to fix: #JERSEY-2490

Hi,

I encountered a similar situation as explained here: https://java.net/jira/browse/JERSEY-2490?jql=project%20%3D%20JERSEY%20AND%20text%20~%20%22declarative%20link%22

My case was an entity, managed by Hibernate, with a lazy loaded collection inside.
Even though I am not interested in loading this collection (Doing so by adding @XmlTransient on it), the DeclarativeLinked feature still try to recursively search for @Link fields in the said collection.

Therefore, like explained in the ticket, I think it makes sense to have a way to bypass the recursive search of Jersey on demand.
To do so, I propose a new annotation to mark a field we would like to ignore.

The change is pretty simple actually.
The name would probably need to be adapt a little bit more to the Jersey notation though.

Please tell me if I need to change some things (names...), write some documentation or anything else.
I am very keen to contribute the right way.