Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Delete Design

 
pamir sonmez
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I must implement a delete sql like that;

delete clause can take three parameters or none, in other words if I want to implement each of them one by one, I had to write 8 query like
delete from MYTABLE where a=:a
delete from MYTABLE where b=:b
delete from MYTABLE where c=:c
....
delete from MYTABLE where a=:a and b:=b and c=:c

Instead I thought to create a hql query and create its query string dynamically.
However, the security program(fortify) alerts and say "Access Control: Database (Security Features, Data flow)"
What fortify says someone may access the data that he cannot have the right.By the way it is not possible

In this situation to surprise error, should I define 8 named query in hibernate mapping or
just leave it just like that or
Is there another and better way of doing what I want to do?

I hope I am clear enough
Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure I follow. It doesn't sound like its anything to do with Hibernate - instead you perhaps need to change how Fortify behaves in this situation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic