AnantLabs / codesmith

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

Database default values #658

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

What is the expected output? What do you see instead?
Be able to have default values pulled from the database be assigned to 
properties on business objects in the CSLA templates

What version of the product are you using?
6.5

Please provide any additional information below.

Original issue reported on code.google.com by brad.bac...@gmail.com on 25 Jun 2012 at 6:07

GoogleCodeExporter commented 9 years ago
Hello,

We would like to do this and support this functionality in the engine. Where do 
you think we should generate these default values at? A user might want to 
update the default generated values and preserve them across regeneration.

Original comment by bniemyjski on 16 Jul 2012 at 4:55

GoogleCodeExporter commented 9 years ago
I typically set these values in SQL Server in the default value or Binding
column property. I regularly use the getdate function and the
original_login function on some fields. I can think of a way you could
support that but it probably would not fit for all customers.

Original comment by brad.bac...@gmail.com on 17 Jul 2012 at 3:09

GoogleCodeExporter commented 9 years ago
Yeah,

We can generate code for this, but the issue is if we translate GetDate() to 
DateTime.Now when the object is created it will be inserted with the time of 
creation on the client (utc independent) vs the sql server datetime of when it 
was inserted.

Original comment by bniemyjski on 20 Jul 2012 at 2:19

GoogleCodeExporter commented 9 years ago
I thought about that. Whatever you think is best will work for me. Thanks
for considering this request.

Brad

Original comment by brad.bac...@gmail.com on 20 Jul 2012 at 3:00