Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business Object Generator
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01444100
Message ID:
01444212
Vues:
35
Kevin,

Thanks for your reply. I already did what you suggested and its apparant now that the problem is not with nulls but with a constraint. This is hard to comprehend as the underlying data source is a view and I am just returning this view when I get this error.

Furthermore, I don't know how to debug this as when I run this in the test bench, it just fails when running the method from the BO. I know this is not a MM problem, but it still is perplexing and I have not solved it yet.


>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,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform