Page 1 of 1

Default class property value

Posted: Mon 22 Aug 2016 05:48
by jwrz
Hi, I am testing trial version of EntityDAC with Entity Developer and I have a few questions.

Firstly, I have problem with default property value. When I create class with various properties (int, string etc.) I can't set default value (in property editor on the left side of screen), this property is not enabled.

Second problem relate to previous. I want to create tables with two special columns: CreationTime and ModificationTime. Is it possible to do it? I prefer to use server time, so I think that it should be done in DB. For CreationTime the easiest should by GETDATE() as default value but as you see in first question I have problem with that prop.
I found prop called IdGenerator which can by set to Custom, i try to use it to solve my problem but I failed, and I don't know how to use it.

I hope you can help me, and convice me to chose your ORM solution.

JW

Re: Default class property value

Posted: Mon 22 Aug 2016 10:26
by AlexP
hello,

The Default property is "expanded" in the editor, and you should select the type and value for your field. Moreover, there are two events in the context for setting default values.

Re: Default class property value

Posted: Mon 22 Aug 2016 14:04
by jwrz
Wow, thank you. I don't know why i didn't saw that.

Re: Default class property value

Posted: Tue 23 Aug 2016 07:33
by AlexP
You are welcome. Feel free to contact us if you have any further questions.