Exception in creating a delete query in EntityManager

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amila77
    New Member
    • Jun 2012
    • 1

    Exception in creating a delete query in EntityManager

    here is the query

    Code:
    int re = em.createQuery("delete object(o) 
    from Vote as o where o.memberReply.id = '"+replyId+"'").executeUpdate();
    What's wrong in above query? (used jpa 1.0 Toplink provider)
  • PsychoCoder
    Recognized Expert Contributor
    • Jul 2010
    • 465

    #2
    What error(s) are you getting? What is the error you're getting. Also, show more code, the error could be happening elsewhere

    Comment

    • Rabbit
      Recognized Expert MVP
      • Jan 2007
      • 12517

      #3
      Why delete object(o) and not delete o?

      Comment

      Working...