New Posts New Posts RSS Feed: Deleted Entities
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Deleted Entities

 Post Reply Post Reply
Author
jozza View Drop Down
Newbie
Newbie


Joined: 11-Jul-2007
Posts: 25
Post Options Post Options   Quote jozza Quote  Post ReplyReply Direct Link To This Post Topic: Deleted Entities
    Posted: 27-May-2009 at 12:21am
Hi
 
We are using Devforce 5.1.
 
We have a scenario where we have a table of the following structure:
 
TaskName <== Primary Key
Description
... + some other fields
 
 
If I delete a Task Entity with say (TaskName = 'Task1') by going myTask1.EntityAspect.Delete(), and I don't persist the change to the database (because I'm not ready to). If I then create a new Task with the same TaskName ('Task1') it gives me a duplicate entity error saying there is already a task with Task1, even though the original task is marked for deletion.
 
Why is this so? and how do I get around this problem.
 
Thanks
 
Jacob Jozwiak
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 27-May-2009 at 9:39am

DevForce does not allow two Entities in the Entity Cache to have the same Primary Key.  Otherwise, how could it distinguish one Entity from the other.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down