Data Interface Objects

This forum is for programmers who have questions about the source code.
Post Reply
grahamde
Posts: 52
Joined: Tue Jun 19, 2007 10:17 am

Data Interface Objects

Post by grahamde » Fri Jun 22, 2007 10:01 am

fcarlier,

There are a few things that should be brought to your attention with your recent changes. First thing is, I noticed that you have been tending to replace all the Delete() functionality in the data interface classes with the simple DataObjectFactory<Type>.DeleteObject(Type object). However, deletions are not always this simple. For instance, in the patient class, one should not be allowed to delete patients (for cross referencing purposes), but instead the patient status should be marked to 4 (as provided in the function summary). Also, for mounts, when a mount is deleted, not only the mount object has to be deleted, but also the corresponding mount items. The same is true for in a mountdef and mountitemdef correlation. I also noticed that you have sometimes been using Path.Combine(), when we have created a custom combine path functionality ODFileUtils.CombinePaths(), which behaves slightly differently than Path.Combine(), and was created to help protect against quirks in the program when we began support for Unix. I hope this helps.
Derek
Open Dental Software

fcarlier
Posts: 75
Joined: Tue Jun 19, 2007 3:12 am
Location: Ghent, Belgium

Post by fcarlier » Fri Jun 22, 2007 11:22 am

Hi Derek,

For the Patients class, yes, I may have missed a couple of things there. I didn't aim for full compatibility, but for a quick and easy way to verify the functionality in the DataObjectFactory class.

As far as for MountItemDefs and Mounts, I've been re-reading the logs (because I did want to get it right there). At least for Mounts and MountItemDefs, the logs clearly show that the original code also was a simple DELETE FROM Table WHERE TableNum = Num.

As for ODFileUtils, I wasn't aware of these compatbility issues. Thanks for pointing them out.

On an unrelated note, my first name is Frederik, so you may want to call me Frederik instead of fcarlier ;).

Frederik.
Frederik Carlier

grahamde
Posts: 52
Joined: Tue Jun 19, 2007 10:17 am

Mount Items

Post by grahamde » Fri Jun 22, 2007 1:52 pm

Frederik,

I went back and looked and the image module and remembered that the mount and associated mountitems and documents are deleted in the image module, by calling the other simpler delete functionality. Originally the delete functions were setup to handle deleting form multiple tables as I suggested, but were then moved out as to keep the Delete() functions on the objects simpler. Sorry for the confusion.
Derek
Open Dental Software

Post Reply