realm-java icon indicating copy to clipboard operation
realm-java copied to clipboard

creating a standalone objet gives me this extra field called valid?

Open JohnnyTwoShoes opened this issue 10 years ago • 2 comments

Hi,

I copy an object, using copyFromRealm. But the data is now riddled with this extra field, "valid":false

How do I remove it?

Realm version(s): 0.87.0

Android Studio version: 1.5

Which Android version and device: 4.4.4 api19 genymotion

JohnnyTwoShoes avatar Jun 08 '16 00:06 JohnnyTwoShoes

isValid is part of the state from RealmObject and indicate that the object is no longer managed by Realm. If you want to avoid having that as part of your model you can use our RealmModel interface instead of extending RealmObject. You can read more here: https://realm.io/docs/java/latest/#realmmodel-interface

cmelchior avatar Jun 08 '16 04:06 cmelchior

ok, thanks.

JohnnyTwoShoes avatar Jun 08 '16 10:06 JohnnyTwoShoes