Patent ID: 7788275

Claim:
An object-relational mapping system for mapping object-oriented constructs to relational database constructs, the system comprising: one or more computer-executable components embodied on a computer-readable storage medium, the computer-executable components including: a relationship component configured to identify relationships among a plurality of objects, the plurality of objects including a first object, a second object and a third object, the relationships among the plurality of objects including: a first relationship between the first object and the second object; and a second relationship between the first object and the third object; and a loading system configured to retrieve, from a relational database, data based on the relationships identified by the relationship component, the loading system including: a custom locator component configured to: determine whether a first default SQL query dynamically generated from the first relationship is overridden; and determine whether a second default SQL query dynamically generated from the second relationship is overridden; a default action component configured to: in response to the custom locator component determining that the first default SQL query dynamically generated from the first relationship is not overridden, use the first default SQL query to retrieve, from the relational database, data mapped to the first relationship; and in response to the custom locator component determining that the second default SQL query dynamically generated from the second relationship is not overridden, use the second default SQL query to retrieve, from the relational database, data mapped to the second relationship; and an override component configured to: in response to the custom locator component determining that the first default SQL query dynamically generated from the first relationship is overridden, use a first stored procedure to retrieve, from the relational database, the data mapped to the first relationship; and in response to the custom locator component determining that the second default SQL query dynamically generated from the second relationship is overridden, use a second stored procedure to retrieve, from the relational database, the data mapped to the second relationship.