- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.4k
Closed
Description
Hi there,
I'm trying to debug an issue in my application where the foreign key field for a row is being set to null when the parent object is being saved. The models are very complex so it's hard to create a test case but essentially they look like this,
class ParentEntity {
    childEntitites: Array<ChildEntity>
}
class ChildEntity {
    parentEntity: ParentEntity
}
Assume that all the relevant decorators have been set and it's a ManyToOne relationship. There are no cascade options set on the Parent and Child entities. When I save the ParentEntity the parentEntity field gets set to null.
It looks like this line of code,
https://github.com/typeorm/typeorm/blob/0.0.11/src/persistence/SubjectOperationExecutor.ts#L734
is what's doing it. Would you know why?
Thanks
Metadata
Metadata
Assignees
Labels
No labels