[Post New]posted Today 5:18:01 PM Quote Edit
Hi everybody,
I hope I am posting in the correct place.
I have been looking into customizing/overriding the CreateUpdateDelete operations created by Hibernate.
Code:
@Entity
@Table(name=”share”)
@SQLInsert(sql=”Insert into share (name, price, code, dummy) value (?, ?, ?, ?)”)
public class Share { ... }
is there a way to dynamically populate the sql and use it in the @SQLInsert statement ?
eg:
Code:
@Entity
@Table(name=”share”)
@SQLInsert(sql=mySQLStatement)
public class Share {
protected Share ()
{
if(x = 1)
{ mySQLStatement = "Insert into share (name, price, code, myState) value (?, ?, ?, ?);}
else
{mySQLStatement = "Insert into share (name, price, code, myState) value (?, ?, ?, XMLTYPE(?));}
}
Thanks a lot
Thanks a lot