Thursday, September 09, 2010 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
 
ForumForumSupportSupportCslaFactory CTPCslaFactory CTPGet by criteria doesnGet by criteria doesn't return children
Previous Previous
 
Next Next
New Post
 8/8/2008 11:09 AM
 

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 8:14 PM
 

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

Marcel

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

   

UsersOnline
Membership Membership:
Latest New User Latest: Anco
Past 24 Hours Past 24 Hours: 1
Prev. 24 Hours Prev. 24 Hours: 1
User Count Overall: 1382

People Online People Online:
Visitors Visitors: 8
Members Members: 0
Total Total: 8

Online Now Online Now: