Note: As stated in other question creating relations between tables/models doesn't require adding foreign keys
I'm not quite sure what do you need it for, but here's description of two most common cases (screenshot shows how to achieve each case with Extension Builder)
Creating relation to FrontendUser
model / fe_user
table
In TYPO3 ver. 6.2 fe_user
has a model as well: \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
, you can just add this as common relation in Builder modeling tool (fig. 2 at screenshot) in the field \Fully\Qualified\Classname
(you need to Show advanced fields
to set it (fig. 1) use this FrontendUser
and it will create proper SQL
and TCA
definitions.
Real extending FrontendUser
(FU) model
On the other hand if your People
* model just extends the fe_user
table, because you want to reuse existing fe_user table for your people, you can also extend FrontendUser
model for real (fig. 3) in that case you'll inherit all getters, setters from FU etc. and you won't need to write them yourself.
In such case your model will be a separate type of fe_user
, the discriminator field is by default: tx_extbase_type
and builder will add new type like Tx_YourExt_Employee
*
note: For model names you should use singular form i.e Man
instead of People
