Max wrote:
I'm using LLBLGen 2 on VS 2005, adapter template. I need to support both MSAccess and SQL Server.
I'm getting some problem about relation cascade actions (delete cascade / update cascade).
I've converted my MSAccess based LLBL project to SQL Server.
I've generated the DDL for SQL Server.
But running the DDL will generate many errors worrying about cyclic or multiple path cascade action. And the relations aren’t created
I know that SQL Server is more restrictive about cyclic cascade action on relation, respect others RDBMS.
I’ll need to speak about that with the DBA
If multiple paths lead from table A to table B, cascades are hard to guarantee to work. SqlServer most of the time then gives up.
Now I've some question from the LLBLGen Pro viewpoint:
*) Do LLBLGen generated code rely on relation cascade action in the database?
No, it doesn't assume cascades are there. I.o.w.: you can work with the db as if there aren't cascades, so you've to execute the code in the right order.
If the answer is "no" then I can generate:
- DBGeneric+DBSpecific code using Access LLBL Project
- DBSpecific code for SQL Server using the converted project
and everything shall run fine, even if the database have different cascade relation action.
true, as you'll never run into them, unless you delete a PK entity first of course
*) Do LLBLGen designer extract relation cascade action information from analyzed DB?
Yes, although not in all db's (as sometimes it's not retrievable), but it doesn't use that information.
If "yes"
*) Do LLBLGen Project converter take into account the different relation cascade action limitation of different RDBMS?
No. It simply keeps them the same.
*) Do DDL Template take into account the relation cascade action when generating SQL?
Yes, but the cascades aren't converted.