AnantLabs / codesmith

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

Casing on DAL concurrency property doesn't match business property name case #697

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create a timestamp field in SQL server table named "lastChanged"
2. Generate solution with both business and DAL projects

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

The entity property is named "LastChanged" while the property in the DAL code 
is named "lastChanged" and generates a compile error.

Generator 7
C#
VS2010
Template CSLA 4.1 Beta ObjectFactory.DataAccess.ParameterizedSQL.cst

#region Helper Methods
...
<% if(Entity.ConcurrencyProperty != null) { %>
                item.<%= Entity.ConcurrencyProperty.KeyName %> = ADOHelper.GetBytes(reader, "<%= Entity.ConcurrencyProperty.KeyName %>");

I believe:

    item.<%= Entity.ConcurrencyProperty.KeyName ...

should read

    item.<%= Entity.ConcurrencyProperty.Name ...

which is what is used for forming the property name in the entity.

Original issue reported on code.google.com by gdnbfa on 27 Jan 2014 at 7:32

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r3053.

[CSLA] -  Issue 697: Casing on DAL concurrency property doesn't match business 
property name case

Original comment by bniemyjski on 27 Jan 2014 at 10:10

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. This has been fixed in the latest nightly which will 
be available shortly via (community.codesmithtools.com/nightly/).

Original comment by bniemyjski on 27 Jan 2014 at 10:11