Is this what you are looking for? You can mix schema-full and schema-less behavior. I think the MANDATORY constraint is what you are looking for.
create class Person extends V; create vertex Person; create property Person.name STRING (MANDATORY TRUE,NOTNULL); create property Person.gender STRING (MANDATORY TRUE,NOTNULL); create property Person.salary INTEGER (MANDATORY FALSE,NOTNULL); This means that name and gender are required and can't be null. Salary is optional but when set it can't be null. The following will work: create vertex Person set gender="female",name='Jill' create vertex Person set gender="male",name='Sam',salary=400 The following will fail: create vertex Person create vertex Person set name='Frank' create vertex Person set salary=null,gender="female",name='Jill' On Wednesday, August 3, 2016 at 4:02:42 AM UTC-4, parvat wrote: > > Hi, Can you help me on the below question > > Can a define different properties to the vertex having same label's > > Example: > Person with name,age ,gender > Person With name,gender ,salary > > Here Person is the Vertex name. > > > Ideally i want to have a schema less nature . > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
