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

Create an Oracle Hibernate Dialect that uses clob rather than long #21

Open
bjagg opened this issue Jun 13, 2018 · 0 comments
Open

Create an Oracle Hibernate Dialect that uses clob rather than long #21

bjagg opened this issue Jun 13, 2018 · 0 comments
Assignees
Labels
Enhancement WIP Work in progress

Comments

@bjagg
Copy link
Member

bjagg commented Jun 13, 2018

Hibernate's Oracle Dialects use LONG datatypes for historical reasons. Unfortunately, Oracle has a limitation of one LONG per table. There is no such limit for CLOBs, and Oracle fully supports them. Still, Hibernate will not change their dialect. Do switch to CLOBs, we simply need to subclass and configure CLOBs.

public class Oracle10gDialect extends Oracle9iDialect {

    public Oracle10gDialect() {
        super();
        registerColumnType(Types.LONGNVARCHAR, "clob");
        registerColumnType(Types.LONGVARCHAR, "clob");
    }

    public JoinFragment createOuterJoinFragment() {
        return new ANSIJoinFragment();
    }

}

See uPortal-Project/AnnouncementsPortlet@master...bjagg:ANNPLT-127_oracle-bad-grammer

@bjagg bjagg self-assigned this Jun 13, 2018
bjagg added a commit to bjagg/portlet-utils that referenced this issue Jun 17, 2018
@bjagg bjagg added the WIP Work in progress label Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement WIP Work in progress
Projects
None yet
Development

No branches or pull requests

1 participant