Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tables referencing object arrays generate Record array in POJOs, rather than POJO array #5103

Closed
lukaseder opened this issue Feb 22, 2016 · 1 comment

Comments

@lukaseder
Copy link
Member

This SQL

CREATE TYPE my_type AS
(
  mt_column1 smallint NOT NULL
);

CREATE VIEW my_view
AS SELECT
   some_column_id integer
   ARRAY(SELECT
      ROW(an_int)::my_type
      FROM a_table
   ) AS my_view_types
  FROM a_regular_table 
  WHERE my_condition_hold);

Generates this Java:

public class MyView extends Object implements Serializable, Cloneable, IMyView {

    private static final long serialVersionUID = 1984808170;

    private final Long           some_column_id;
    private final MyTypeRecord[] my_view_types;
}

Rather than this expected code:

    private final MyType[] my_view_types;

While the currently being generated code still works in PostgreSQL, users prefer not to have any jOOQ record dependencies in their generated POJOs.


See: http://stackoverflow.com/q/35403931/521799

@lukaseder
Copy link
Member Author

There's a slight regression risk in the DefaultRecordMapper, which is why this issue won't be merged to 3.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant