foreign key serialization and registration