Yes, please see "using the generated code - Adding your own code to the generated classes", in where initialization include templates are discussed which generate code into the init routines for the entities.
Surround your set routines with:
if(fields.State==EntityState.New)
{
// your init code
}