Hello everyone! I'm making a little web app with this awesome framework, is my very first time with one framework, so I'm a bit confused about some concepts...
I have a question about working with model and the ORM concept itself.
Let's say the I have a table called
robots which has an id (PK) and name. Also I have a
robot_parts which contains and id (its PK), robot_id (FK) and part_name.
How can I to magically use the ORM here?
Using models like
$robots = Robots::findFirst(3); I can get the
name with $robots->name, but how can I get the RobotParts->name?
$robots->RobotParts->part_name works? if not, is possible to achieve this behaviour? I know that I can use ORM to delete and save, but what about finding?
Thanks and please forgive my bad english.