views:

91

answers:

2

Hello,

I have a timestamp field in a table and when i create a new instance of my object, set some fields, do not set the timestamp field and use the .Save(), i get an error saying that i cannot set an exlicite value to a timestamp field during an INSERT.

How can i have SubSonic not save anything in that perticular field?

Thank you

A: 

I'm not sure I perfectly understand the question, but the default SubSonic templates are set up to treat certain date/time fields as special cases, those being CreatedOn and ModifiedOn. You could look through your T4 template for references to those fields and modify their behavior.

Does this even apply to your situation, or are your timestamp fields named something else completely?

Skinniest Man
i do have these 2 fields and they are managed ok.The issue is with another field of type timestamp that is in my table.
MarkyMarc
A: 

this is what you are looking for

http://mvcframeworkblog.blogspot.com/2009/10/subsonic-how-to-add-new-datatype.html

Fleents
I did that already and I do see the field in the class that SS creates. It's when I do a save, SS tries to insert a value in that field which is not a legal operation.
MarkyMarc