Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Early binding of referenced objects #41

Closed
hisystems opened this issue Mar 25, 2012 · 1 comment
Closed

Early binding of referenced objects #41

hisystems opened this issue Mar 25, 2012 · 1 comment
Assignees

Comments

@hisystems
Copy link
Owner

Currently, late binding of referenced objects is supported via the ObjectReference class. This is assigned the foreign table's distinct field when the referencing object is loaded. On the first call to ObjectReference.Object the object is loaded and on subsequent calls the already loaded object is returned. Early binding of objects is supported via the IDatabaseObjects.TableJoins function which causes the database record and the referenced record to be loaded into one record. This record is then used to load the object and the referenced object in one operation rather than via multiple calls to the database. However, this requires overriding the IDatabaseObject.LoadFields function and using the Database.ObjectLoad, which is not a particularly succinct solution.

@ghost ghost assigned hisystems Mar 25, 2012
@hisystems
Copy link
Owner Author

Utilise the existing ObjectReference class but specify an attribute that indicates whether early or late binding should be utilised: ObjectReferenceLoadAttribute(Early / Late). When an object is using early binding the appropriate table joins should be automatically created and the referenced object loaded and assigned to the ObjectReference.Object property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant