Hi;
Can you provide some examples?
I am in the same boat: trying to organize data for different chunks based 
on different criteria. 
As example how would you change Rob's code using your suggestion ?
Could you provide code?

-galina



On Wednesday, May 28, 2014 1:55:56 PM UTC-7, Lvc@ wrote:
>
> Hi Rob,
> I don't recommend to use clusters for "daily" stuff. Then I suggest you to 
> use inheritance between classes, where each class can reside to multiple 
> clusters. This is ok, but don't mix records of different class on the same 
> cluster.
>
> Lvc@
>
>
>
> On 28 May 2014 20:01, Rob Gratz <[email protected] <javascript:>> wrote:
>
>> So, do you not recommend the strategy of using clusters as a storage for 
>> daily logs or do you not recommend using clusters and inheritance together? 
>>  I had thought about using the graph model for this storage and am looking 
>> into that next.
>>
>>
>> On Wednesday, May 28, 2014 7:25:28 AM UTC-5, Lvc@ wrote:
>>
>>> Hi Rob,
>>> Even though this is possible, I don't suggest to put in a cluster 
>>> documents of different classes, because this feature could be not more 
>>> supported in the future.
>>>
>>> I rather suggest you to use indexed attributed to access to the "daily" 
>>> logs or also create a vertex "DailyLog" where to attach Log vertices with 
>>> an edge.
>>>
>>> Lvc@
>>>
>>>
>>>
>>> On 27 May 2014 21:56, Rob Gratz <[email protected]> wrote:
>>>
>>>> v1.7
>>>> I'm doing some sample coding in preparation for an upcoming project and 
>>>> am trying to use class inheritance with the Document model along with 
>>>> clusters.  I have not found a good documented example of using clusters 
>>>> through the API, so I can't say for sure I'm doing this right, but here is 
>>>> my scenario.  I have a parent class called "AuditLog" and a child called 
>>>> "PersistenceAuditLog" that I would like to store in the same cluster.  My 
>>>> attempt was to store information in a "daily cluster" with these two (and 
>>>> others later) classes.  Is this possible?
>>>>
>>>>       OClass auditClass = database.getMetadata().
>>>> getSchema().createClass("AuditLog");
>>>>       auditClass.addCluster("today");
>>>>       auditClass.addCluster("yesterday");
>>>>       auditClass.createProperty("id", OType.STRING);
>>>>       auditClass.createProperty("username", OType.STRING);
>>>>       auditClass.createProperty("timestamp", OType.DATETIME);
>>>>       auditClass.createProperty("module", OType.STRING);
>>>>
>>>>       OClass persistenceAuditClass = database.getMetadata().
>>>> getSchema().createClass("PersistenceAuditLog", auditClass);
>>>>       persistenceAuditClass.addCluster("today");
>>>>       persistenceAuditClass.addCluster("yesterday");
>>>>       persistenceAuditClass.createProperty("object_type", 
>>>> OType.STRING);
>>>>       persistenceAuditClass.createProperty("operation", OType.STRING);
>>>>       persistenceAuditClass.createProperty("old_value", OType.ANY);
>>>>       persistenceAuditClass.createProperty("new_value", OType.ANY);
>>>>
>>>>
>>>>  -- 
>>>>
>>>> --- 
>>>> 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.
>>>>
>>>
>>>  -- 
>>
>> --- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
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.

Reply via email to