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

Class.getDeclaredFields() 返回的元素顺序不确定可能会导致测试失败 #895

Open
SaaiVenkat opened this issue Nov 4, 2023 · 0 comments

Comments

@SaaiVenkat
Copy link
Contributor

SaaiVenkat commented Nov 4, 2023

Assert.assertEquals("SELECT id,user_name,address,state  FROM user " +
       "<where>" +
       "<if test=\"id != null\"> AND id = #{id}</if>" +
       "<if test=\"userName != null\"> AND user_name = #{userName}</if>" +
       "<if test=\"address != null\"> AND address = #{address, typeHandler=tk.mybatis.mapper.mapperhelper.ComplexEntityTest$AddressHandler}</if>" +
       "<if test=\"state != null\"> AND state = #{state}</if></where>", sql);

Assert.assertEquals("SELECT address,id,state,user_name  FROM user " +
        "<where>" +
        "<if test=\"address != null\"> AND address = #{address, typeHandler=tk.mybatis.mapper.mapperhelper.ComplexEntityTest$AddressHandler}</if>" +
        "<if test=\"id != null\"> AND id = #{id}</if>" +
         "<if test=\"state != null\"> AND state = #{state}</if>" +
         "<if test=\"userName != null\"> AND user_name = #{userName}</if></where>", sql);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant