I have a problem. I used to have an entity that had a @id private String key . But now I have to change that to a @id private Long key. Problem is Objectify wont let me. I get an
IllegalStateException: Loaded Entity has name but com.XX.YYY.MyClass has no String @id
So Im not sure what to do.
I’m not up on Objectify (so hopefuly someone who is can step in), but assume that Objectify is passing through the restriction that an Entity key must have exactly one of a name or an id. Once an Entity is created, the key is immutable.
The only ways to re-type a key are
In both case, you have to find and migrate references by hand.
Both of these involve careful work.