I'm trying to understand a line from the Google Datastore API which says:
JDO uses annotations on Java classes to describe how instances of the class are stored in the datastore as entities, and how entities are recreated as instances when retrieved from the datastore.
I'm sure this is a very basic question for most people. But I don't understand why the class object needs to be stored in the database and later retrieved. Why not instead define what you want the datastore to look like for your application and store only relevant data from your class properties as needed instead of storing the entire class or always storing the same properties repeatedly? The instance of the class contains all kinds of information that, it seems to me, does not need to be in the database - methods, class variables, instance variables - we write that stuff in our source code and we don't need to reproduce it in the database - we only need certain relevant data that the class is operating on to be stored. Right? Maybe I'm not understanding what is meant by the quoted statement. Please correct me if I have misunderstood.