I have an obect called "Task" and each task has a type. In my database design without ORM, i would have a table called TaskTypes and Task table would have foreign key to the TaskTypes table where we define Tasks..
Is there a way to handle this behaviour natively in jugglingdb? Or do i have to create another model called TaskTypes and make Task "belongTo" a TaskType class?
The "native" way to handle this would be to define each model.
You can take a slight shortcut with
Task.belongsTo('tasktype');
which will add the columntasktypeId
for you.