I got the following error while testing a simple piece of code in JUnit that creates a User object (an Objectify Entity) and then tries to attach it as a Parent
What's the type of 'id' in User class? If it's 'Long', keeping id=null should work. From what you explained, looks like it's 'long' (primitive). if that's the case, change it to 'Long' and try again.