codesmithtools / Templates

CodeSmith Generator Templates
http://www.codesmithtools.com/product/generator
54 stars 35 forks source link

CSLA ReadOnlyList Generation Error #406

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have a tabled called Codes that I generate as a ReadOnlyList of 
ReadOnlyChild objects
2. Generate the objects.  You will get a collection called CodeInfoList and and 
entity called CodeInfo
3. Build your solution, and you will receive compile errors

What is the expected output? What do you see instead?

In some of the generated code, it refers to an object called Code, which 
doesn't exist.  Codesmith generated and object called CodeInfo.  These errors 
occur in the following places:

CodeInfoList.DataAccess.cs - in the partial methods region, it adds the 
following line:

partial void OnAddNewCore(ref Code item, ref bool cancel);

it should be

partial void OnAddNewCore(ref CodeInfo item, ref bool cancel);

CodeInfo.Generated.cs - in the Synchronous factory methods region, it generates 
a factory method that returns Code, not CodeInfo.  Also, on the call to 
DataPortal.FetchChild<T>, the T should be CodeInfo, not Code.

CodeInfoList.Generated.cs - The exists function gets generated as follows:

public static bool Exists(CodeCriteria criteria)
        {
            return Business.Code.Exists(criteria);
        }

it should be:

public static bool Exists(CodeCriteria criteria)
        {
            return Business.CodeInfo.Exists(criteria);
        }

What version of the product are you using?

CodeSmith: v5.2.1, CSLA Templates: v2.0.1.1689, CSLA Framework: v4.0.0.

Please provide any additional information below.

Original issue reported on code.google.com by RoyMunso...@gmail.com on 15 Jun 2010 at 12:21

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 19 Jun 2010 at 8:39

GoogleCodeExporter commented 9 years ago
Hello,

This should be fixed in the latest nightly. These changes require a lot of 
testing!!

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 28 Jun 2010 at 9:54

GoogleCodeExporter commented 9 years ago
Thanks for all your work!  Really appreciated!  I'll grab the latest and test 
things out.

Original comment by RoyMunso...@gmail.com on 29 Jun 2010 at 2:28

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 15 Jul 2010 at 2:22