Giter VIP home page Giter VIP logo

Comments (7)

jeffgbutler avatar jeffgbutler commented on June 30, 2024

It is a known issue. It only arises on certain databases like MySQL. I think the best solution would be to change the generate so the alias is only used on select statements and not anywhere else. I'll take a look at making that fix.

from generator.

italobb avatar italobb commented on June 30, 2024

The behaviour with MAPPER option, instead of ANNOTATEDMAPPER, was not to use the alias in DELETE clause. So, I agree with you, it can be just ignored and will be compatible with old codes that used MAPPER.

from generator.

LouisWayne avatar LouisWayne commented on June 30, 2024

Still happening - any updates?

from generator.

jeffgbutler avatar jeffgbutler commented on June 30, 2024

This turns out to be difficult to solve with the generator as it stands now. I've been working on a new SQL templating library for MyBatis and I have a fix for this issue in that new library. I think that's how it's ultimately going to be fixed because it would just be too cumbersome to fix it in the current generator.

from generator.

jeffgbutler avatar jeffgbutler commented on June 30, 2024

This will not be resolved in what I'm now calling the "legacy" code generators - it would mean generating a huge amount of new code.

This IS resolved in the new code generator that is based on MyBatis Dynamic SQL that was just released.

from generator.

ai-vip avatar ai-vip commented on June 30, 2024

Which version can solve this problem?

from generator.

jeffgbutler avatar jeffgbutler commented on June 30, 2024

It is fixed in the latest version (1.3.6) - but only if you change to the new Dynamic SQL runtime. You do that by specifying <context targetRuntime"MyBatis3DynamicSql">

If you do this, please note that the generated code is not 100% compatible with prior versions. I think it is much better and far more flexible. If you have not made the change to this new runtime yet, then I recommend you read about it first to see if this is a good option for you. http://www.mybatis.org/generator/generatedobjects/dynamicSql.html

from generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.