I have a Model class. This class should be able to reference itself, i.e. the resulting "output" from the model should be like this.
Some instanceOf Model.class
|-> Some instanceOf Model.class having parent instance referenced as parent_id
|-> Some instanceOf Model.class having ...........
The instances represent geographical entities organized in a hierarchy. To be honest I have no idea how to implement this.