This will add the attribute `projectId` or `project_id` to User. Instances of Project will get the accessors `getWorkers` and `setWorkers`. We could just leave it the way it is and let it be a one-way association.
But we want more! Let's define it the other way around by creating a many to many association in the next section:
This will add the attribute `projectId` or `project_id` to User. Instances of Project will get the accessors `getWorkers` and `setWorkers`.
Sometimes you may need to associate records on different columns, you may use `sourceKey` option:
So far we dealt with a one-way association. But we want more! Let's define it the other way around by creating a many to many association in the next section.