customizing hibernate properties in hyperjaxb

前端 未结 1 1083
鱼传尺愫
鱼传尺愫 2021-01-24 18:15

The default configuration of hyperjaxb is creating hibernate annotations that result in hibernate annotations that produce incredibly verbose SQL

相关标签:
1条回答
  • 2021-01-24 18:31

    You can customize default mappings as you want:

    http://confluence.highsource.org/display/HJ3/Customizing+default+mappings

    Here are the default customizations.

    And here's a test project which customizes defaults.

    For instance, customizing the default cascade for many-to-one would look like (untested):

    <jaxb:bindings schemaLocation="schema.xsd" node="/xs:schema">
        <hj:persistence>
            <hj:default-many-to-one>
                <!-- So what do you think to be a reasonable default mapping? -->
                <orm:cascade>
                    <orm:cascade-persist/>
                </orm:cascade>
            </hj:default-many-to-one>
        </hj:persistence>
    </jaxb:bindings>
    

    Further links:

    • Customizations schema
    • Customizations guide

    Please check the documentation. You can (but don't have to) customize a lot.

    0 讨论(0)
提交回复
热议问题