【发布时间】:2023-03-07 12:32:01
【问题描述】:
不确定是什么导致了这个错误。我在我们的一个包中乱七八糟,并试图让一个过程与一些 Java 代码一起运行。你能告诉我我做错了什么吗?也许是 Java 或 SQL?
PROCEDURE update_object_comment (p_object_comment IN OUT objects_comment_bean, p_user_id IN user_list.user_id%TYPE)
IS
t_object_comment objects_comment_bean;
BEGIN
SELECT get_comments (p_object_comment.id,t_object_comment.type )
INTO t_object_comment
FROM DUAL;
-- We only perform the update if something really changed
IF NOT p_object_comment.equals (t_object_comment)
THEN
-- Copy what was in the database so that we are positive
-- that the created information can never change.
p_object_comment.auditable := t_object_comment.auditable;
-- <<<< <<<<<<<<<<<<<<<<<<<<<<IT SAYS THE ERROR IS HAPPENING HERE>>>>>>>>>>>>>>>>>>>>>>>>>>>
-- The modified date has to be set on update (but not creation)
p_object_comment.auditable.modified_date := SYSDATE;
p_object_comment.auditable.modified_by := p_user_id;
UPDATE object_comments
SET comment = p_object_comment.comment,
auditable = p_object_comment.auditable
WHERE id = p_object_comment.id
AND type = p_object_comment.type;
END IF;
END update_object_comment;
【问题讨论】: