This discussion is archived
3 Replies Latest reply: Dec 18, 2011 4:56 PM by 632433 RSS

apex_application.add_validation_error deleted in Apex 4.1

632433 Newbie
Currently Being Moderated
Hello,

Why is apex_application.add_validation_error deleted in Apex 4.1?

I thought this was a supported API.

When compiling one of our packages in Apex 4.1 which used the above procedure it invalidates the code. The replacement is apex_error.add_error.

Why not deprecate it? The underlying code could have been changed to just redirect to the new procedure.
  • 1. Re: apex_application.add_validation_error deleted in Apex 4.1
    632433 Newbie
    Currently Being Moderated
    I have raised SR 5066440971 with Oracle about this.
  • 2. Re: apex_application.add_validation_error deleted in Apex 4.1
    fac586 Guru
    Currently Being Moderated
    AdamQ wrote:

    Why is apex_application.add_validation_error deleted in Apex 4.1?
    What version were you using?
    I thought this was a supported API.
    Why? It wasn't documented. Off the map there be dragons:

    +{thread:id=294789}+
    +{thread:id=2295323}+

    Always better to seek clarification before tickling their tails:

    +{thread:id=2321397}+

    (I'm waiting patiently...)

    Re: How to create an Apex 3.1 a session context programmatically? contributes to the confusion: that kind of thing is interesting and helpful (unit test package code that references APEX collections) but you use it at your own risk, with appropriate circumspection when it comes to inclusion in production code.

    In my opinion it's bad practice on Oracle's part to include private/unpublished methods in the same packages as public/published APIs. Instead of the {noformat}<tt>apex_*</tt>{noformat} APIs consisting of synonyms on {noformat}<tt>wwv_*</tt>{noformat} objects they should be wrapper packages that only expose public, documented methods&mdash;and preferably these public packages should be in their own schema. Wouldn't hurt performance too much would it? (Guess I'll have to benchmark that...)

    Another question is why not all of the {noformat}<tt>wwv_*</tt>{no format} package bodies are wrapped to limit off-road exploration and subsequent exposure of undocumented methods?
  • 3. Re: apex_application.add_validation_error deleted in Apex 4.1
    632433 Newbie
    Currently Being Moderated
    Thankyou fac586. I realise I read about this API a while ago in a blog and forgot that it was an unsupported API. I withdraw my question.

    Funny you link to a post by Luis Cabral as I now work with him and we use that code. :)

    We often look through the spec of apex packages to see what's there and if there's something we can use instead of writing our own code. Sometimes we don't check if there is a corresponding Oracle document about it. Dangerous practice, as I have seen now.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points