Methods and apparatus for executing a query on dynamic properties of a
plurality of objects in a database are provided. In one implementation,
the method includes obtaining a query; determining that a first portion
of the query comprises a method for accessing a dynamic property of the
plurality of objects; obtaining mapping data associated with the dynamic
property of the plurality of objects, the mapping data mapping the
dynamic property to a pre-determined location in the database;
translating the first portion of the query in accordance with the mapping
data such that the first portion of the query is executable against the
pre-determined location in the database without creating instances of the
plurality of objects; executing the query including executing the
translated first portion of the query without creating instances of the
plurality of objects; and displaying a result of the executed query to a
user.