tags:

views:

66

answers:

1

When updating the settings.ttinclude and doing "run custom tool" on all .tt files, I'm getting....

Class ‘TestAccount’ must implement ‘Sub SetIsNew (is Loaded as Boolean)’ for interface ‘SubSonic.Schema.IActiveRecord'

I'm very familiar with SubSonic 2 but just getting setup on SubSonic 3. Is this a vb.net only issue?

Thanks,

John

A: 

Yes, it is. You have to modify the templates. Here:

ActiveRecord.tt line 296 wrap property name with [] e.g.

Public ReadOnly Property [<#=propName #>] As IQueryable(Of <#=fk.OtherClass #>)

ActiveRecord.tt line 322 wrap property name with [] e.g.

Public Property [<#=col.CleanName #>] As <#=col.SysType #><#=CheckNullable(col)#>

ActiveRecord.tt line 76 needs Implements iActiveRecord.SetIsNew

Public Sub SetIsNew(isNew As Boolean) Implements IActiveRecord.SetIsNew

Structs.tt line 45 wrap property name with [] e.g.

Public ReadOnly Property [<#=col.CleanName#>] As IColumn

Rick Ratayczak
Rick, thank you very much. That did it. I had one project that worked and the rest needed this change. On the project that works, I found that I was accidentally using 3.0 install of SubSonic 3.0.2. If I add you changes to that version I get the error that there is no matching interface 'SubSonic.Schema.IActiveRecord'. That's what tipped me off that I must be using different references. So I'm all 3.0.2 and working now. Couldn't have done it without you.Thanks,John
John Granade