Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8956319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:45:51+00:00 2026-06-15T14:45:51+00:00

I am working with object relational features in Oracle and am having trouble persisting

  • 0

I am working with object relational features in Oracle and am having trouble persisting a change to an object that occur in a member procedure. First I have an abstract super type:

CREATE TYPE fantasy_action AS OBJECT (
action_id      NUMBER,
time_completed DATE,
NOT INSTANTIABLE MEMBER PROCEDURE execute(SELF IN OUT NOCOPY fantasy_action)
NOT INSTANTIABLE NOT FINAL;

This is part of one of my type declarations (there is a corresponding table created as well):

CREATE TYPE fantasy_trade UNDER fantasy_action (
...[other variables]...
OVERRIDING MEMBER PROCEDURE execute(SELF IN OUT NOCOPY fantasy_trade));

And the issue I am having is with this part of the member procedure:

CREATE OR REPLACE TYPE BODY fantasy_trade AS
     OVERRIDING MEMBER PROCEDURE execute( SELF IN OUT NOCOPY fantasy_trade ) IS
     current_week NUMBER;
     player1_plays NUMBER;
     player2_plays NUMBER;
  BEGIN
     ...
     time_completed := current_date;
     ...
  END;
END;

And finally the way I am calling the procedure is through a simple PL/SQL loop:

DECLARE
   action fantasy_action;
  BEGIN
     FOR x IN (SELECT DEREF(action) as action FROM fantasy_scheduledaction WHERE time <= current_date AND DEREF(action).time_completed is null) LOOP
     x.action.execute();
END LOOP;
END;

The time_completed field is still null even after verifying that the rest of the procedure went through — what could be the problem? I have tried using SELF.time_completed to no avail, and all the other variables in the procedure are reference appropriately. Does it have to do with the fact that this variable is from the super type? Or could it be that I am calling the procedure through a dereferenced pointer? Any help is much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:45:52+00:00Added an answer on June 15, 2026 at 2:45 pm

    Try using UTL_REF.UPDATE_OBJECT:

    DECLARE
        action fantasy_action;
    BEGIN
        FOR x IN
        (
            SELECT DEREF(action) as action_deref, action action_ref
            FROM fantasy_scheduledaction
            WHERE time <= current_date
                AND DEREF(action).time_completed is null
        ) LOOP
            x.action_deref.execute();
            utl_ref.update_object(x.action_ref, x.action_deref);
        END LOOP;
    END;
    /
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on my first object oriented bit of python and I have the
I have a question about object relational updates on join fields. I am working
We' re working on a project that has a relational object model and we
I'm working on this requirement: I have an object-relational model quite big, where entities
After working with the .NET GDI+ Rectangle object, I've noticed that if I create
I'm working with a DAL object that is written in a layout similar to
I have been working on keeping things object oriented for my project. Currently, I'm
I am working on a change analyzer for Entity Framework and have one small
I am working on Database first approach with Entity Framework 4.1. I have 2
I have a custom model/object for a magento extension I'm working on. I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.