Java objects retrieved directly from OrientDB (as you're doing in this example) are proxied transparently to their underlying records, allowing lazy loading of their fields. In your scenario, you'll have to use the User
object get
methods in order to trigger the population of the corresponding fields from the DB. The fields have default values (all null
in your case) until loaded.
See also: "How It Works" in OrientDB Object2RecordJavaBinding