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] <javascript:>> 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] <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.
