orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

New property,default value, new function

Open deluxxx opened this issue 12 years ago • 6 comments

Hello,

  1. maybe you can add new property UUID

  2. set default value for all properites. for example ALTER PROPERTY User.isUser DEFAULT TRUE;

  3. Function for UUID, UUID.random(), generate random value

because we want generate scripts sql where generate all start data.

deluxxx avatar Jan 24 '14 13:01 deluxxx

Good idea but it is relatively easy to implement you can example of function here com.orientechnologies.orient.core.sql.functions.math.OSQLFunctionSum and default values can be set during fields validation here com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract#validateField. Would you like to try ?

andrii0lomakin avatar Jan 24 '14 14:01 andrii0lomakin

I'm sorry but I have a lot of work and exams. It can look for that about 1 march. Thanks for the reply!

deluxxx avatar Jan 28 '14 06:01 deluxxx

Good will wait then, I dream to have more and more new contributors in our project :)

andrii0lomakin avatar Jan 30 '14 08:01 andrii0lomakin

Hi everyone. Any updates on this? It's not urgent but I'm just curious.

thecyman avatar Jul 25 '14 18:07 thecyman

I'd also like this, it'd be nice for example if OUser.status was "ACTIVE" by default

phpnode avatar Jul 31 '14 00:07 phpnode

Any updates on this? Also, the default value could be a function like sysdate() in a field that holds the creation date.

dlaberge avatar Dec 30 '14 16:12 dlaberge