I have the following database structure:
Table: User
Fields: Id, Name, Password, Status
Table: Rol
Fields: Id, Description
Table UserRol
Fields: UserId, RolId
So, I mapped those tables to devforce objects. Now, I can insert or update the objects and then calling SaveChanges() to the manager, everithing works all right.
The problem that I'm facing is that when I want to delete an User object, witch has some roles asigned and call SaveChanges(), the following error arises:
Save failed - The statement has been terminated.
The DELETE statement conflicted with the REFERENCE constraint "FK_UsuarioRol_Usuario"
The problem, I presume, is that the persistence engine is not deleting the related rows in UsuarioRol table, so when tries to delete the User the constraint error apperars... Is this by desing? What should I do?
Thanks.