Patent attributes
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for enforcing a mapping between entities in a database and aggregates in an application framework. One of the methods includes receiving a request to populate a program object corresponding to an entity in a first relation of a relational database, the relational database is queried to obtain values for one or more attributes of the entity in the first relation and a plurality of identifiers that each identify a respective entity in the second relation of the relational database. The program object is populated with an aggregate having a complete collection of identifiers representing an m-to-n relationship in the database.