tags:

views:

191

answers:

1

Using Subsonic 3 I have the fields:

      o CreatedOn (datetime)
      o CreatedBy (nvarchar(50))
      o ModifiedOn (datetime)
      o ModifiedBy (nvarchar(50))

When I add data to my table it is not adding data to these columns. Am I missing something?

+1  A: 

These fields aren't automatically populated in version 3 like they were in version 2, unless you are using the ActiveRecord templates. You could modify the templates pretty simply to add the functionality yourself.

Adam
Would you not have to modify the source rather than templates?
Jon
No need to modify the source, you could simply modify the Context.tt files to auto populate the required fields before calling update/insert.
Adam
I am now using the ActiveRecord templates that have them in but when I call repository.add these fields are still not being populated
Jon
If you call the ActiveRecord.Add method are the fields populated? Have a look in your generated ActiveRecord classes and you should see the fields being populated in the Updated and Add methods.
Adam
If I call ACtiverecord.Add then they get populated
Jon