Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Highly Annoying Bug/Quirk of Mere Mortals?
Message
From
21/10/2002 11:08:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Highly Annoying Bug/Quirk of Mere Mortals?
Miscellaneous
Thread ID:
00713531
Message ID:
00713531
Views:
64
{Okay, let me preface my comments by stating that I am using v6 of MM. I have not upgraded yet because the project timeline does not yet allow for the conversion. However, I am interested to see if this behavior is in the newest version of MM as well...}

When you use the Business Object Builder and assign a table to the data environment and then save and exit, and then reopen it and save another data access object (a view or something) to the same data environment, we all know that when the framework brings up the table during runtime, it will do so like this: '_tablename_' instead of just 'table'. Subsequently, the right alias never gets selected.

The way around this is to remove every table and view, save the changes, and then add all the old data access elements back and then add the new one (and then save again). Kind of a pain, but not a big deal.

UNTIL....

From a model/pattern perspective, the data environment class really acts as a persistance layer between your business object and the data elements. Theoretically, all data access code should be placed in the data environment so your buisness object really doesn't need to know anything about the underlying data elements. For instance, if you are using a table and a view in your data environment, it is the responsibility of the data environment to know which view or table is required as well as to make sure it is set as the intially selected alias (so the wrappers work properly.) The business object should not have to know how to do this because it would require knowing the specific names of the table and the view(s). This would tightly couple the business object to the database which kills reuse.

So, let's say you create custom methods on the dataenvironment class. Later, you realize you need to add a view to the business object. In order to avoid the underscores in the table, you clear all the data access elements first. You then add them all back (plus the new view) and then save. Guess what happens? The framework just WIPED OUT ALL YOUR CUSTOM METHODS!!!

Please tell me I'm way off base here...or that this problem has been fixed in v7...or how I can fix this....or...

Thanks,

Paul LaForge
plaforg@utah.gov
Next
Reply
Map
View

Click here to load this message in the networking platform