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

#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)
#3

Ok Tank you

 


Post Reply

To post a reply and/or subscribe to update notifications - please login