Can I have additional properties in the GAE data warehouse model?

I have a GAE app where I am using geomodel for a location based model in my database. There are two "types" of this model, however they must be associated with geo-queries together. The two "types" share a set of basic properties, but the second type has several more. Is there a way to make these other properties optional and not just set dummy values ​​for them?

+3


source to share


1 answer


Within a data warehouse, entities are independent of each other. You can have different objects of the same type that have different sets of attributes. This happens very often if you add new attributes to a new version of your application, and entities that already exist in the data store will not have these attributes.

In your code, however, for any given version, you end up declaring one model for your view. You can choose not to assign values ​​to specific attributes for different types.



Just make sure your code correctly handles cases where attributes do not exist or are set to None.

+3


source







All Articles