Monday, February 06, 2012 Register    Login
Instructions

In order to add new threads or reply to existing posts, you have to be logged-in. If you are not registered yet, you need to register first, and then login with your personal credentials.

   

CslaFactory Forums
HomeHomeSupportSupportCslaFactory CTPCslaFactory CTPGet by criteria doesnGet by criteria doesn't return children
Previous
 
Next
New Post
8/8/2008 12:09 PM
 

I have a class Test which has a collection of TestVersion children.

I have made a criteria on Test called "Key".

When I use GetTestByKey the list of TestVersions is not loaded correctly.

The reason is the stored procedure:

CREATE PROCEDURE dbo.mas_GetTest
 @Key nvarchar(255),
 @TestID uniqueidentifier
AS
IF (@TestID IS NULL AND @Key IS NULL)
 RETURN -1
 
SELECT
 [TestID],
 [Key],
 [TypeId],
 [Name],
 [TestLastModified]
FROM
 dbo.[mas_Test] with (nolock)
WHERE
 ([TestID] = @TestID OR @TestID IS NULL)
 AND ([Key] = @Key OR @Key IS NULL)
 exec dbo.mas_ListTestVersionByTest @TestID
SET QUOTED_IDENTIFIER OFF

As you can see this code only loads the children when a TestID is specified.

 

 
New Post
8/10/2008 9:14 PM
 

Thanks, again, Peter. I am going to check that and fix it.

Marcel

 
Previous
 
Next
HomeHomeSupportSupportCslaFactory CTPCslaFactory CTPGet by criteria doesnGet by criteria doesn't return children


   

UsersOnline
Membership Membership:
Latest New User Latest: empirowe
Past 24 Hours Past 24 Hours: 2
Prev. 24 Hours Prev. 24 Hours: 0
User Count Overall: 1586

People Online People Online:
Visitors Visitors: 3
Members Members: 0
Total Total: 3

Online Now Online Now: