well... I guess, I could use some generic class for all entities, so there 
is only one class - *Item*, with "type" and "userId" attributes on each 
node, ex:

   - *User*("id":"123","name":"john",age:99)    ->    *Item* 
   ("type":"user", "userId":"123", "name":"john",age:99)
   - *Purchase*("id":"2222","userId":"123","price":100)    ->    *Item* 
   ("type":"purchase", "purchaseId":"2222", "userId":"123", "price":100)
   - *Account*("id":"11111","userId":"123","balance":10000)    ->    *Item* 
   ("type":"account", "accountId":"11111", "userId":"123","balance":10000)
   - etc.
   
in that case, I hope, it would be possible to implement custom sharding 
strategy - based on attribute "userId" (all Items related to userId will be 
placed in the same partition - user, purchases of that user, accounts of 
that user, etc - that is what I'm looking for).
But following this approach I lose object-oriented features of OrientDb API 
and custom types definition via schema, maybe I will loose something else 
too, which I don't know about yet :(

maybe there is a better way to do such thing?

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to