Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Integrity Checking
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01131873
Message ID:
01132614
Views:
13
Wang Tong,

>2. For the second question, we try to prevent our application from deleting a record if the record is referenced in other child table. For example, there 2 tables, customer and order. Customer table is the parent table. Order table is child table. The relationship is one to many, which means customer can have many orders. If a customer has order record in order table, our application will prevent user from deleting this record. We can do this by using cascade DELETEs or UPDATEs in database. Does MM.Net provide better way of handling this scenario?

Yes...in the business object's HookPreDelete() method you can place code that checks if there are any existing records that would prevent a delete, then abandon the delete if so.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform