Default class property value

Discussion of open issues, suggestions and bugs regarding EntityDAC
Post Reply
jwrz
Posts: 12
Joined: Mon 22 Aug 2016 05:30

Default class property value

Post by jwrz » Mon 22 Aug 2016 05:48

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

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Default class property value

Post by AlexP » Mon 22 Aug 2016 10:26

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.

jwrz
Posts: 12
Joined: Mon 22 Aug 2016 05:30

Re: Default class property value

Post by jwrz » Mon 22 Aug 2016 14:04

Wow, thank you. I don't know why i didn't saw that.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Default class property value

Post by AlexP » Tue 23 Aug 2016 07:33

You are welcome. Feel free to contact us if you have any further questions.

Post Reply