yasser777 / nettiers

Automatically exported from code.google.com/p/nettiers
0 stars 0 forks source link

EntityInstanceBase template not using EntityFactory #150

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the entityfactory
2. from an entity called GetOriginalEntity for example or call Copy
3. The entity returned is an entity of type defined in MetaDataEntities and
not from the EntityFactory

What is the expected output? What do you see instead?
When creating an instance of an entity, it should use the entityfactory and
not use the new operator

What version of .netTiers and CodeSmith are you using?
.netTiers 2.2.0 and CodeSmith 5.0.4

Please provide any additional information below.

Original issue reported on code.google.com by paulpham26@gmail.com on 29 Dec 2008 at 10:51

GoogleCodeExporter commented 9 years ago
Hello,

Could you please try to reproduce this with .netTiers 2.3b2

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 3 Feb 2009 at 2:45

GoogleCodeExporter commented 9 years ago
I can see from the template, that it is not using the entityfactory : 
For example the method Create<classname> does a new <classname> instead of 
using the
entityfactory.

Here is the template from .netTiers 2.3b2

public static <%=className%> Create<%=className%>(<% WrapInit(); for (int x=0; 
x <
colsUpdatable.Count; x++) { %><%= GetCSType(colsUpdatable[x]) %> <%=
GetFieldName(colsUpdatable[x]) %><% WrapIncr(colsUpdatable[x]); if (x <
colsUpdatable.Count -1){%>, <%  WrapLine(3); } }// end for %>)
        {
            <%=className%> new<%=className%> = new <%=className%>();
            <% for (int x=0; x < colsUpdatable.Count; x++) { %>
            new<%=className%>.<%=GetPropertyName(colsUpdatable[x]) %> = <%=
GetFieldName(colsUpdatable[x]) %>;
            <% }// end for %>
            return new<%=className%>;
        }

Original comment by paulpham26@gmail.com on 3 Feb 2009 at 5:23

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 25 May 2009 at 3:30

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 25 May 2009 at 4:19