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

hisystems opened this Issue Mar 25, 2012 · 1 comment


None yet
1 participant

hisystems commented Mar 25, 2012

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


This comment has been minimized.


hisystems commented Mar 25, 2012

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.

@hisystems hisystems closed this in ea8b776 Apr 10, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment