Delete not working on entities?

Posts   
 
    
bonder
User
Posts: 36
Joined: 23-Sep-2003
# Posted on: 04-Nov-2003 17:22:03   

We have noticed that we are unable to delete entities on one of our projects. Is anyone else seeing this?

--Bruce

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 04-Nov-2003 17:45:45   

bonder wrote:

We have noticed that we are unable to delete entities on one of our projects. Is anyone else seeing this?

--Bruce

I can delete entities here, so it works in some situations wink .

Can you step into the code for me to check out what the query is that is executed? (step into the DAO object, step over the IActionQuery construction statement, go to cmd window in vs.net, type: ?((ActionQuery)deleteQuery).ToString()

Also, are you simply calling Delete() on the entity or are you calling DeleteMulti() on the collection?

Frans Bouma | Lead developer LLBLGen Pro
bonder
User
Posts: 36
Joined: 23-Sep-2003
# Posted on: 04-Nov-2003 23:18:42   

Otis wrote:

Can you step into the code for me to check out what the query is that is executed? (step into the DAO object, step over the IActionQuery construction statement, go to cmd window in vs.net, type: ?((ActionQuery)deleteQuery).ToString()

I'll get this information for you.

Also, are you simply calling Delete() on the entity or are you calling DeleteMulti() on the collection?

On the entity, but the entity has related entities and there is not a cascading delete on the relationship. This will affect the delete result, yes?

--Bruce

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 05-Nov-2003 10:35:39   

bonder wrote:

Otis wrote:

Can you step into the code for me to check out what the query is that is executed? (step into the DAO object, step over the IActionQuery construction statement, go to cmd window in vs.net, type: ?((ActionQuery)deleteQuery).ToString()

I'll get this information for you.

Ok simple_smile I tested it on Northwind. Loaded a customer, Called Delete() and it worked.

Also, are you simply calling Delete() on the entity or are you calling DeleteMulti() on the collection?

On the entity, but the entity has related entities and there is not a cascading delete on the relationship. This will affect the delete result, yes?

If the entity you're trying to delete has a PK value which is referenced by a related entity as a FK, it will fail of course. (but that's then reflected in an exception).

Frans Bouma | Lead developer LLBLGen Pro