Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Business Object Generator
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01444100
Message ID:
01444208
Views:
47
Bob,

>I am creating a BO using the BLG in Mere Mortals and basing it on a view. I am only creating the main class and an Entty class. Now the view is just a list of colums from a couple of tables and it is grouping data by 3 columns with a couple of summed numeric columns.
>
>My question is why does the BLG type the summed columns as decimal with nulls (i.e. 'decimal?'). The columns from the base tables do not allow nulls, so I am curious as to why the BLG does this. The real question I need answered is when I run a stored procedure via a method in this BO to be returned into the Entity class, I get the following error:
>
>"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."
>
>When I run the stored procedure in SSMS, the rows get returned fine and there are no nulls.

I'm not sure why the BLG is indicating these columns are nullable if they are optional in the underlying table--the BLG is actually using a standard SQL Server stored procedure to return this information from the view. At any rate, try regenerating the entity object and in the BLG "Select Database Items" page, select each column in the view and mark all the columns you want to be non-nullable as Required.

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
Next
Reply
Map
View

Click here to load this message in the networking platform