ObjectDB ObjectDB

How to delete a specific column data form a entity.

#1

I have a entity class named Agent having fields Id,Name,Code,Skill ...etc. I wants to delete only the Skill from a row so I use Query like "Delete a.Skill from Agent a where a.Id = 112" but It gives error like "Unexpected query token 'agsk' (FROM is expected)".

How to resolve it.

Thank You

edit
delete
#2

DELETE queries are for deleting complete objects (rows).

You may use an UPDATE query instead and set the field (column) to null.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
edit
delete
#3

Ok Tank you

 

edit
delete

Reply

To post on this website please sign in.