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

Doesn't work for One-to-One relationship #14

Open
ATrubka opened this issue Mar 4, 2014 · 4 comments
Open

Doesn't work for One-to-One relationship #14

ATrubka opened this issue Mar 4, 2014 · 4 comments

Comments

@ATrubka
Copy link

ATrubka commented Mar 4, 2014

The following code ignores inner one-to-one relationships. The only entities for cleanup are collections, while one-to-one is a plain object, which may have collections inside.

        if (fieldValue != null
                && (fieldValue.getClass().getName().contains("org.rhq") || fieldValue instanceof Collection || fieldValue instanceof Object[] || fieldValue instanceof Map))
            nullOutUninitializedFields((fieldValue), checkedObjects, checkedObjectCollisionMap, depth + 1, serializationType);
@ATrubka
Copy link
Author

ATrubka commented Mar 4, 2014

Quick workaround is to add a marker interface to your shared GWT code, which fieldValue is going to be checked for in addition to collections and to implement that interface by every model class read from database. It makes the code non-universal though.

@lincolnthree
Copy link
Member

Hi! Are you working on improving Social PM?

@ATrubka
Copy link
Author

ATrubka commented Mar 5, 2014

Not sure what Social PM is.

@lincolnthree
Copy link
Member

What are you commenting on?

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

2 participants