Comments (7)
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.
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.
Still happening - any updates?
from generator.
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.
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.
Which version can solve this problem?
from generator.
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)
- Add a constuctor with table name parameter HOT 4
- How can I use the project with gradle? HOT 4
- Plugin *** in context *** is invalid and will be ignored. HOT 2
- feature suggest: simplify the example class generated HOT 1
- rootClass can not generate HOT 2
- For snake case table names, is it possible to create a package? HOT 1
- In the latest version, mariadb sets<property name="nullCatalogMeasCurrent" value="true"/>; Not working HOT 4
- MyBatis3DynamicSql how generate xml file? HOT 1
- Fix code scanning alert - Failure to use HTTPS or SFTP URL in Maven artifact upload/download HOT 1
- How to customize the method name
- Why doesn't it support generating controllers and services? HOT 1
- Can you give me a hint about automatic generation? HOT 5
- Mybatis dynamic SQL cannot customize model annotations HOT 3
- If there are only two primary keys and both are selected, no generation will occur updateByPrimaryKeySelective HOT 1
- idea about make MBG more pluggable HOT 3
- Site Distribution Needs Completed On this Project
- Plugin API missing clientUpdateByPrimaryKeyMethodGenerated method for dynamic SQL runtime HOT 4
- Running MBG from Java with an XML Configuration File issue
- IntelliJ IDEA 2023.2.1 (Ultimate Edition) 报错 HOT 1
- Mybatis Generator for Eclipse no longer accessible HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator.