onCreate.identityType=role not the first one

Skip to first unread message


Oct 25, 2016, 4:09:46 AM10/25/16
to OrientDB

I'm using v. 2.2.12 enterprise. 

I've got a problem using onCreate.identityType. 

The documentation says:

onCreate.identityType: Specifies whether to insert the user's object or its role (the first one). By default, it is set to user, but you can also set it to use its role.

But it's not true, I've got a user with multiple roles and inserting a new record into a ORestricted class it takes randomly on of them. Here what I did:

  • create a new db
  • create class test extends ORestricted
  • ALTER CLASS test CUSTOM onCreate.identityType=role
  • insert into ouser set name='test',password='test',status='ACTIVE',roles=(select from orole where name in ['reader','writer'])
  • Logged with test user
  • insert into test set now=sysdate() (x 10 times)

Casually _allow field contains #4:1 or #4:2

Is it a bug? 

If not, any suggestion for making it work like written in the documentation?

Oleksandr Gubchenko

Oct 25, 2016, 4:36:11 AM10/25/16
to OrientDB
I've answered you on stack.

Reply all
Reply to author
0 new messages