Advanced GuidesKey binding (foreign keys)Bind parent and child keys using options on FactoryTypeOverview Bind a parent's key to a child's inverse key for non-standard foreign key names. Example class Photo { @FactoryValue(faker => faker.image.url()) url: string; userId: number; // copied from parent User.id } class User { @FactoryType(() => AutoIncrement) id: number; @FactoryValue(faker => faker.person.fullName()) name: string; @FactoryType(() => [Photo], { key: 'id', inverseKey: 'userId' }) photos: Photo[]; } const userWithPhotos = factory.one(User).with(5, 'photos').make(); Rules key must exist on the parent. inverseKey must exist on the child. Works for one‑to‑one and one‑to‑many. Circular referencesModel and generate explicit circular relations safelyError handlingCommon validation errors and how to avoid them