Hi,
I have setup a default value for a property of an entity ie Type="test". However when I append the row in the grid and CTRL-S, this default is not used? Is this a bug?
I am trying to test the Entity and how it behaves against the DB without writing MVC code.
Thanks.
Why does the default value for a property not appear in when inserting via ED Grid?
Re: Why does the default value for a property not appear in when inserting via ED Grid?
Hi,
Now sorted. One has to use the default value setting for the Storage property as opposed to the Class Property. Then inserting rows via "Retrieve data" will use this default and enter into DB
Now sorted. One has to use the default value setting for the Storage property as opposed to the Class Property. Then inserting rows via "Retrieve data" will use this default and enter into DB
Re: Why does the default value for a property not appear in when inserting via ED Grid?
OK, I am confused again. It seems that there is a bug here in that "Retrieve Data" does not respect string default values, no issue with INTS. With INTS one can just setup up the default value on the class and it works a treat. With String, nothing.... just (null).
Thoughts.
Thoughts.
Re: Why does the default value for a property not appear in when inserting via ED Grid?
Hi,
OK, I have found it. I think this can be described as a very undocumented feature in ED. The answer is to use single quotes around the string ie 'XXX', not "XXX" or XXX. So it seem that this value is passed straight thro to the DB which is expecting 'XXX' for strings.
Ed
OK, I have found it. I think this can be described as a very undocumented feature in ED. The answer is to use single quotes around the string ie 'XXX', not "XXX" or XXX. So it seem that this value is passed straight thro to the DB which is expecting 'XXX' for strings.
Ed
Re: Why does the default value for a property not appear in when inserting via ED Grid?
This is correct. We are investigating the way to provide the possibility of setting string default value without quotes.
Re: Why does the default value for a property not appear in when inserting via ED Grid?
Not really a problem. Just needs highlighting. A short term fix would be to add this info to the help at the bottom so
>The default value for the property
could become
>The default value for the property. Remember strings should use single quotes ie 'test'.
That addition would have saved me half a day .
>The default value for the property
could become
>The default value for the property. Remember strings should use single quotes ie 'test'.
That addition would have saved me half a day .
Re: Why does the default value for a property not appear in when inserting via ED Grid?
Thank you for the suggestion.EdB wrote:Just needs highlighting.
There will be a possibility of setting a string default value without quotes starting from the next build of Entity Developer. We will post here when it is available for download.