Skip to content

Please support typeAliases of configuration on OgnlClassResolver #416

Open
@ApplePedlar

Description

@ApplePedlar

For example, I wrote this select tag, I need write full class name with package name on OGNL code.

<select id="getConvenienceStoreList" resultType ="Store">
    SELECT * FROM Store
    WHERE type = ${@foo.product.constant.StoreType@CONVENIENCE_STORE}
    ORDER BY id
    LIMIT #{start}, #{limit}
</select>

MyBatis Configuration has a typeAliases tag. This is simply a shorter name for a Java type. But this tag is not support on OGNL code.

If I wrote typeAliases tag in MyBatis configuration XML like this,

<typeAliases>
    <package name="foo.product.constant" />
</typeAliases>

I want you to write like this.

<select id="getConvenienceStoreList" resultType ="Store">
    SELECT * FROM Store
    WHERE type = ${@StoreType@CONVENIENCE_STORE}
    ORDER BY id
    LIMIT #{start}, #{limit}
</select>

Mayby It can be realized if improved OgnlClassResolver class.

Thank you.

Metadata

Metadata

Assignees

Labels

enhancementImprove a feature or add a new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions