If I add to a node more than one type does it get the data from all types?
example, a node that is an animal a mammal and then a pet
also if I have a zoo can I insert this node as animal to the zoo animal list and still get the info of more specific types?
Amm, I think I didn’t explain myself well.
let’s say I have these types:
type <Animal> {
Animal.num_of_legs #int
Animal.eyes_color #string
}
type <Mamal> {
Mamal.can_swim #bool
Mamal.age #int
}
type <Pet> {
Pet.owner_name #string
Pet.name #string
}
type <Zoo> {
animals #a list of animals
}
Now I want to add to the zoo a node that is a pet, a mammal, and an animal - let’s say a node of a cat named Garfield.
Will I be able to do that, and will I be able to query this node and via the zoo and still get the name of the owner
Can you supply an example?
Ok so after you add the cat in your example you can just link it to the zoo by adding it to the animal list and query it from each one of its types right?
I mean I can search for the zoo by its name for example and filter this “Funky Black Cat”.
Then I can expand all of its fields and get the data right?
Can you show me how to add the “Funky Black Cat” node to a list of all animals in the zoo?
An animal mammal pet zoo’s example was to simplify the explanation of what I want to do.
I the real project, I have a type named DataSource, which is a base type, and then I have NosqlDb, File, object-store, etc. each one of them is a type with specific predicates.
I also have a type Repository, which can have multiple data sources, so I wanted to know if I can have a base type and expanding types and then use a list of the base type and gain a sort of polymorphism
you answered the rest of the questions with the query you added and the example of how to insert a new animal to the zoo