This is a migrated thread and some comments may be shown as answers.

Oracle field defaults not getting picked up

2 Answers 52 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Corey
Top achievements
Rank 1
Corey asked on 06 Jun 2012, 03:00 AM
I have a schema in Oracle that has a CreatedDate field with a default value of SYSDATE.  When I build my model and save a record without specifying a value for the CreatedDate field, the default value is not used.  I worked around this by setting the Kind to PersistReadOnly, but then I can never override a default value. I would think that the model builder would pick up that there is a default value setup in the DB and use it to initialize the value but let me set it explicitly if I need or want to.  For instance, I've got a field called Valid that defaults to 'X' if validation hasn't been performed, then in my code I can set it to 'Y' or 'N' later when I run my validation routine.  Would that situation have a workaround where the initial save would write the 'X' to the table and later allow me to edit that field?

Oracle 11g, .Net 4.0, VS 2010, ORM 2012.1.301.2.

Thanks in advance,
Corey

2 Answers, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 06 Jun 2012, 02:36 PM
Hello Corey,

The default values support was introduced in the latest internal build of the product – Telerik OpenAccess ORM 2012.1.427.1.

Hope that helps. If any other questions arise, do not hesitate to contact us back.

Regards,

Damyan Bogoev
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
0
Corey
Top achievements
Rank 1
answered on 06 Jun 2012, 03:00 PM
Thanks Damyan for the quick response.  I think I'll hold off and update to the Q2 release.  It's goof to know the issue is fixed, though.

Thanks again,
Corey
Tags
Data Access Free Edition
Asked by
Corey
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Corey
Top achievements
Rank 1
Share this question
or