1. A method, comprising: processing program code with a computer processor to perform the following: determining whether a value of an attribute having an interface type that is not a primitive type and not a persistent class type is an instance of a persistent class, the attribute corresponding to a reference to an interface; if the value is an instance of a persistent class, mapping the attribute to a discriminator column and a reference column within a database, the discriminator column holding the interface type associated with the attribute, the reference column holding a key associated with the value; if the value is not an instance of a persistent class, serializing and storing the value into a serialized-data column within the database; determining whether a second value of a second attribute having an Object type that is not a primitive type and not a persistent class type is an instance of a persistent class, the second attribute corresponding to a reference to an object; if the second value is an instance of a persistent class, mapping the second attribute to the discriminator column and the reference column within the database, the discriminator column holding the object type associated with the second attribute, the reference column holding a second key associated with the second value; if the second value is not an instance of a persistent class, serializing and storing the second value into the serialized-data column within the database; determining whether a third value of a third attribute having a collection interface type that is not a primitive type and not a persistent class type is an instance of a persistent class, the third attribute corresponding to a set of an M to N relationship; if the third value is an instance of a persistent class, mapping the third attribute to a second discriminator column and a second reference column within a join table, the second discriminator column holding the collection interface type associated with the third attribute, the second reference column holding a third key associated with the third value; if the third value is not an instance of a persistent class, serializing and storing the third value into a second serialized-data column within the join table that holds serialized values of additional attributes of non persisted classes other than said third value's class.