I have the following ibatis query which I want to migrate from Oracle to PostgreSQL with Hibernate.
BEGIN
INSERT INTO users(
user_id,
personal_id,
created_by,
modified_by
) VALUES (
#{user_id},
#{personal_id},
<choose>
<when test="userCred == true">'profile'</when>
<otherwise>'basic'</otherwise>
</choose>,
<choose>
<when test="userCred == true">'profile'</when>
<otherwise>'basic'</otherwise>
</choose>
);
EXCEPTION WHEN HIST_INDEX THEN
UPDATE ..........
END;
void insert(@Param("user_id") long user_id, @Param("userCred") boolean userCred);
Do you know how I can migrate properly <choose>
statements for PostgreSQL and also migrate Begin...Exception
block for PostgreSQL?
You need to sign in to view this answers