I am playing with OrientDB in graph mode.
Is there any ability to create vertex(declare vertex type) with property of
user non-primitive custom class?
For example, There is type Car. Car has 'id', 'model' and 'engine'
properties. id is Long, model is String. But can engine be of type Engine
which for example is like
public class Engine {
private String name;
private Long serialNumber;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getSerialNumber() {
return serialNumber;
}
public void setSerialNumber(Long serialNumber) {
this.serialNumber = serialNumber;
}
}
?
Or even more complex with embedded non-primitive property fuelSystem like
public class Engine {
private String name;
private Long serialNumber;
private FuelSystem fuelSystem;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getSerialNumber() {
return serialNumber;
}
public void setSerialNumber(Long serialNumber) {
this.serialNumber = serialNumber;
}
public FuelSystem getFuelSystem() {
return fuelSystem;
}
public void setFuelSystem(FuelSystem fuelSystem) {
this.fuelSystem = fuelSystem;
}
}
I understand that this case is similar to Document DB. And for graph it is
more natural to use separate vertex Engine and edge between Car and Engine.
If using non-primitive properties is possible does it make a sense to use
it instead of plain edges (f.e. performance benefits)?
Is it possible to build query like
select from Car where engine.name="Cosworth"
or
select from Car where engine.fuelSystem.type="benzin"
--
---
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.