Re: Question about JPublisher ...

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Sun, 04 Sep 2011 13:47:29 +0200
Message-ID: <9ch6qhFvugU1_at_mid.individual.net>


On 09/02/2011 04:55 PM, Andreas Leitgeb wrote:
> We've got a pl/sql package, which defines a couple of records:
>
> create or replace package foo.bar is
> type snafu is record (
> sf_col1 varchar2(42),
> );
> type blarg is record (
> bg_col1 varchar2(42),
> );
>
> We use JPublisher to create Java classes for this package, and
> *sometimes* it (unrequestedly) merges two of the records into
> one (Java-)class, which then has (e.g.) both sfCol1 and bgCol1.
>
> When this happens, the created plsql_wrapper.sql also shows
> those merged records - so whatever goes wrong, it seems to go
> wrong right at the start...
>
> How does JPublisher extract the information from the DB, that it
> needs to create its output? And what could cause it to "randomly"
> merge records?
>
> PS: oracle 10.2.0

Just guessing here: both records have the exact same structure (i.e. same order of elements with identical types) - maybe JPublisher is figuring that both are structurally equivalent and lumps them together.

Side note: I would at least consider whether it's a good practice to define two types with identical structure because they *are* equivalent.

Kind regards

        robert Received on Sun Sep 04 2011 - 13:47:29 CEST

Original text of this message