├── wiki
├── Source.wiki
├── Downloads.wiki
├── Issues.wiki
├── Migration.wiki
├── Welcome.wiki
├── Related.wiki
├── DocMavenTutorial.wiki
├── GPGKeys.wiki
├── CLA.wiki
├── HowTos.wiki
├── DocContrib.wiki
├── Samples.wiki
├── Sidebar.wiki
├── Scripting.wiki
├── UserGuides.wiki
├── Generator.wiki
├── Contribute.wiki
├── svn2git.wiki
├── Test.wiki
├── ResultHandlerExample.wiki
├── FaqJapanese.wiki
├── FeedbackWho.wiki
├── Spring.wiki
├── Guice.wiki
├── faq.wiki
├── Caches.wiki
├── FeedbackArticles.wiki
├── DocIbatis2MyBatis.wiki
├── ProcessRelease.wiki
├── DocUpgrade3.wiki
└── FeedbackTestimonial.wiki
├── CODE_MOVED_TO_GITHUB.txt
├── PULL_REQUEST_TEMPLATE.md
├── sub-projects
└── generator
│ └── trunk
│ └── eclipse
│ └── UpdateSite
│ ├── features
│ ├── org.mybatis.generator_1.3.1.201101032122.jar
│ ├── org.mybatis.generator_1.3.2.201207161521.jar
│ ├── org.mybatis.generator.source_1.3.1.201101032122.jar
│ └── org.mybatis.generator.source_1.3.2.201207161521.jar
│ ├── plugins
│ ├── org.mybatis.generator.core_1.3.1.201101032122.jar
│ ├── org.mybatis.generator.core_1.3.2.201207161521.jar
│ ├── org.mybatis.generator.core.source_1.3.1.201101032122.jar
│ ├── org.mybatis.generator.core.source_1.3.2.201207161521.jar
│ ├── org.mybatis.generator.eclipse.doc_1.3.1.201101032122.jar
│ ├── org.mybatis.generator.eclipse.doc_1.3.2.201207161521.jar
│ ├── org.mybatis.generator.eclipse.ui_1.3.1.201101032122.jar
│ ├── org.mybatis.generator.eclipse.ui_1.3.2.201207161521.jar
│ ├── org.mybatis.generator.eclipse.core_1.3.1.201101032122.jar
│ ├── org.mybatis.generator.eclipse.core_1.3.2.201207161521.jar
│ ├── org.mybatis.generator.eclipse.core.source_1.3.1.201101032122.jar
│ ├── org.mybatis.generator.eclipse.core.source_1.3.2.201207161521.jar
│ ├── org.mybatis.generator.eclipse.ui.source_1.3.1.201101032122.jar
│ └── org.mybatis.generator.eclipse.ui.source_1.3.2.201207161521.jar
│ └── artifacts.xml
├── ISSUE_TEMPLATE.md
└── README.md
/wiki/Source.wiki:
--------------------------------------------------------------------------------
1 | Find !MyBatis sources at [https://github.com/mybatis Github]
--------------------------------------------------------------------------------
/wiki/Downloads.wiki:
--------------------------------------------------------------------------------
1 | Download !MyBatis binaries from [http://blog.mybatis.org/p/products.html mybatis.org]
--------------------------------------------------------------------------------
/CODE_MOVED_TO_GITHUB.txt:
--------------------------------------------------------------------------------
1 | WARNING! - These sources are outdated.
2 |
3 | MyBatis project sources and history is now at https://github.com/mybatis
4 |
--------------------------------------------------------------------------------
/wiki/Issues.wiki:
--------------------------------------------------------------------------------
1 |
2 | Since !MyBatis 3.2 the project issue tracker is at [https://github.com/mybatis Github]
3 |
4 | You can still access the [http://code.google.com/p/mybatis/issues/list old tracker] to see past issues.
--------------------------------------------------------------------------------
/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ===========================
2 | STOP!
3 | ===========================
4 |
5 | This repository is not used.
6 | Issues and pull requests will be closed without comment.
7 |
8 | The new repositories are here: https://github.com/mybatis
9 |
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/features/org.mybatis.generator_1.3.1.201101032122.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/features/org.mybatis.generator_1.3.1.201101032122.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/features/org.mybatis.generator_1.3.2.201207161521.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/features/org.mybatis.generator_1.3.2.201207161521.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.core_1.3.1.201101032122.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.core_1.3.1.201101032122.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.core_1.3.2.201207161521.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.core_1.3.2.201207161521.jar
--------------------------------------------------------------------------------
/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ===========================
2 | Do NOT create a new issue!
3 | ===========================
4 |
5 | This repository exists just to keep the old issues migrated from our old project home on Google Code.
6 | The new repositories are here: https://github.com/mybatis
7 |
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/features/org.mybatis.generator.source_1.3.1.201101032122.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/features/org.mybatis.generator.source_1.3.1.201101032122.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/features/org.mybatis.generator.source_1.3.2.201207161521.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/features/org.mybatis.generator.source_1.3.2.201207161521.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.core.source_1.3.1.201101032122.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.core.source_1.3.1.201101032122.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.core.source_1.3.2.201207161521.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.core.source_1.3.2.201207161521.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.doc_1.3.1.201101032122.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.doc_1.3.1.201101032122.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.doc_1.3.2.201207161521.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.doc_1.3.2.201207161521.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.ui_1.3.1.201101032122.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.ui_1.3.1.201101032122.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.ui_1.3.2.201207161521.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.ui_1.3.2.201207161521.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.core_1.3.1.201101032122.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.core_1.3.1.201101032122.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.core_1.3.2.201207161521.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.core_1.3.2.201207161521.jar
--------------------------------------------------------------------------------
/wiki/Migration.wiki:
--------------------------------------------------------------------------------
1 | #summary The MyBatis Schema Migrations tool
2 |
3 | =See migrations project at Github=
4 |
5 | * [http://github.com/mybatis/migrations Project] *
6 |
7 | * [http://mybatis.github.io/migrations Docs] *
8 |
9 | * [http://github.com/mybatis/migrations/releases Downloads] *
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.core.source_1.3.1.201101032122.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.core.source_1.3.1.201101032122.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.core.source_1.3.2.201207161521.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.core.source_1.3.2.201207161521.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.ui.source_1.3.1.201101032122.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.ui.source_1.3.1.201101032122.jar
--------------------------------------------------------------------------------
/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.ui.source_1.3.2.201207161521.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mybatis/old-google-code-issues/master/sub-projects/generator/trunk/eclipse/UpdateSite/plugins/org.mybatis.generator.eclipse.ui.source_1.3.2.201207161521.jar
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | This repository exists just to keep the old issues migrated from our old project home on Google Code.
2 | Please do not submit a new issue or add comments to existing issues and contribute to [the new repositories](https://github.com/mybatis) instead.
3 |
4 | And if you have a question, please use the [mailing list](http://groups.google.com/group/mybatis-user).
5 | We use GitHub Issues only to track bugs and feature requests.
6 |
7 | Thank you!
8 |
--------------------------------------------------------------------------------
/wiki/Welcome.wiki:
--------------------------------------------------------------------------------
1 | == What is !MyBatis? ==
2 |
3 | !MyBatis is a first class persistence framework with support for custom SQL, stored procedures and advanced mappings. !MyBatis eliminates almost all of the JDBC code and manual setting of parameters and retrieval of results. !MyBatis can use simple XML or Annotations for configuration and map primitives, Map interfaces and Java POJOs (Plain Old Java Objects) to database records.
4 |
5 |
6 | http://mybatis.org/images/flow.png
--------------------------------------------------------------------------------
/wiki/Related.wiki:
--------------------------------------------------------------------------------
1 | #summary Related 3rd party projects
2 |
3 | = Introduction =
4 |
5 | The following is a list of external projects related to !MyBatis.
6 |
7 | Please let us know if you are developing a tool or a plugin, so we can add it to this list.
8 |
9 | = Related projects =
10 |
11 | || Project name || Description || Site ||
12 | || !MyBatisEditor || !MyBatis Eclipse Plugin || http://code.google.com/a/eclipselabs.org/p/mybatiseditor/ ||
13 | || Cacheonix || Distributed !MyBatis Cache || http://www.cacheonix.com ||
--------------------------------------------------------------------------------
/wiki/DocMavenTutorial.wiki:
--------------------------------------------------------------------------------
1 | = !MyBatis & Maven =
2 |
3 | The following is the Maven group, artifact and version for !MyBatis.
4 |
5 | {{{
6 |
7 | org.mybatis
8 | mybatis
9 | 3.1.1
10 |
11 | }}}
12 |
13 | If you are looking to try the latest and greatest you can use our snapshot repository. Just add the following to your project's pom.xml or to a profile defined in your settings.xml.
14 |
15 | {{{
16 |
17 | mybatis-snapshot
18 | MyBatis Snapshot Repository
19 | https://oss.sonatype.org/content/repositories/snapshots
20 |
21 | }}}
--------------------------------------------------------------------------------
/wiki/GPGKeys.wiki:
--------------------------------------------------------------------------------
1 | = GPG Keys =
2 |
3 | The file located on
4 |
5 | {{{ https://mybatis.googlecode.com/svn/committers/KEYS }}}
6 |
7 | contains the !MyBatis developers GPG keys. Users can import the keys to verify the artifact signatures.
8 |
9 | = Users =
10 |
11 | Checkout the file by running
12 |
13 | {{{ svn co https://mybatis.googlecode.com/svn/committers }}}
14 |
15 | and run
16 |
17 | {{{ gpg --import KEYS }}}
18 |
19 | = Developers =
20 |
21 | Checkout the file by running
22 |
23 | {{{ svn co https://mybatis.googlecode.com/svn/committers }}}
24 |
25 | and run
26 |
27 | {{{ (gpg --list-sigs && gpg --armor --export ) >> KEYS }}}
28 |
29 | then recommit
30 |
31 | {{{ svn ci -m "added simone's gpg key" }}}
--------------------------------------------------------------------------------
/wiki/CLA.wiki:
--------------------------------------------------------------------------------
1 | = Contributor License Agreement =
2 |
3 | !MyBatis desires that all contributors of ideas, code, or documentation to !MyBatis projects complete, sign, and submit (via email) an [http://mybatis.googlecode.com/svn/trunk/ICLA Individual Contributor License Agreement] (CLA). The purpose of this agreement is to clearly define the terms under which intellectual property has been contributed to !MyBatis and thereby allow us to defend the project should there be a legal dispute regarding the software at some future time. A signed CLA is required to be on file before an individual is given commit rights to !MyBatis project.
4 |
5 | CLAs may be submitted by traditional postal mail, fax, or by emailing a scan of the signed copy to Clinton Begin or Simone Tripodi.
--------------------------------------------------------------------------------
/wiki/HowTos.wiki:
--------------------------------------------------------------------------------
1 | #summary How Tos and Dummy Guides
2 |
3 | = Introduction =
4 |
5 | The !MyBatis 3 User Guide is excellent, but is lacking in examples. This selection of How Tos aims to help novice users quickly implement every day features which make MyBatis so powerful.
6 |
7 | Where possible, the examples from the User Guide or the [http://code.google.com/p/mybatis/source/browse/#svn/sub-projects/contact_manager%3Fstate%3Dclosed contact manger example] will be used
8 |
9 | = How Tos =
10 |
11 | == Select ==
12 | * [HowToSelectMultipleParams Select with multiple parameters]
13 |
14 | == Insert ==
15 | * Implementing auto increatment ID field in Oracle and Mybatis (coming soon)
16 |
17 | == ResultHandler ==
18 | * [ResultHandlerExample Handle results from complex queries]
--------------------------------------------------------------------------------
/wiki/DocContrib.wiki:
--------------------------------------------------------------------------------
1 | #summary How to contribute documentation to MyBatis
2 |
3 | = Help out! =
4 |
5 | You make the best author of the documentation, because you are a user of the framework and therefore have a better perspective for what it takes to explain and use !MyBatis.
6 |
7 | There are a few ways you can contribute to the documentation:
8 |
9 | * Checkout the xdoc manual from http://mybatis.googlecode.com/svn/trunk/src/site or the wiki from http://mybatis.googlecode.com/svn/wiki, modify it, create a patch and fill an [http://code.google.com/p/mybatis/issues/list Issue] with it.
10 |
11 | * Submit an issue with the description containing the newly created documents that you'd like to contribute (Issue Tracker supports wiki formatting).
12 |
13 | * Make a request to the user list regarding documentation that is missing.
--------------------------------------------------------------------------------
/wiki/Samples.wiki:
--------------------------------------------------------------------------------
1 | = Code Samples =
2 | == JPetStore 6 ==
3 | 6th version of the JPetStore family. Built on !MyBatis 3, Stripes and Spring.
4 |
5 | This sample shows how to build a full Web application in a simple way and coding as less as possible. This version of JPetStore is composed by just 24 java classes.
6 |
7 | Get it from [http://code.google.com/p/mybatis/downloads/list?can=3&q=Product%3DSample]
8 |
9 | And have a look at its documentation at [http://www.mybatis.org/spring/sample.html]
10 |
11 | == Contact Manager ==
12 | A simple application built with Stripes, Google Guice and !MyBatis 3 that lets you manage a contact list.
13 |
14 | Check it out from [http://code.google.com/p/mybatis/source/browse/#svn%2Fsub-projects%2Fcontact_manager]
15 |
16 | == Scala Code Samples (beta2) ==
17 | Basic code samples:
18 | [https://github.com/mnesarco/mybatis-scala-samples-beta2]
19 |
20 | Play Framework 2.0 Sample Application:
21 | [http://www.fdmtech.org/2012/03/a-better-example-of-play-framework-2-0-with-mybatis-for-scala-beta/]
--------------------------------------------------------------------------------
/wiki/Sidebar.wiki:
--------------------------------------------------------------------------------
1 | #summary Contents
2 |
3 | === Wiki ===
4 |
5 | * [Welcome Welcome Page]
6 | * [http://code.google.com/p/mybatis/w/list Page List]
7 |
8 | === Documentation ===
9 | * [UserGuides User Guides]
10 | * [Samples Code Samples]
11 | * [FeedbackArticles Tutorials and Books]
12 | * [DocMavenTutorial MyBatis & Maven]
13 | * [DocUpgrade3 From iBATIS 2.x to MyBatis]
14 | * [faq Frequently Asked Questions]
15 |
16 | === Tools ===
17 |
18 | * [Migration Schema Migrations Tool]
19 | * [Generator MyBatis Generator]
20 |
21 | === Extras ===
22 |
23 | * [Spring Spring Integration]
24 | * [Guice Guice Integration]
25 | * [Caches 3rd party caches]
26 | * [Scripting 3rd party scripting engines]
27 |
28 | === Related Projects ===
29 |
30 | * [Related MyBatis related projects]
31 |
32 | === Process ===
33 |
34 | * [ProcessRelease Release Process]
35 | * [GPGKeys GPG keys]
36 |
37 | === Contributions ===
38 |
39 | * [Contribute Get Involved]
40 | * [Test Create a Test]
41 | * [DocContrib Contribute Documentation]
42 | * [CLA Contributor License Agreements]
43 |
44 | === Feedback and Testimonials ===
45 |
46 | * [FeedbackWho Who's using MyBatis]
47 | * [FeedbackTestimonial Feedback and Testimonials]
--------------------------------------------------------------------------------
/wiki/Scripting.wiki:
--------------------------------------------------------------------------------
1 | #summary 3rd party scripting engines
2 |
3 | = Introduction =
4 |
5 | !MyBatis 3.2+ supports pluggable scripting engines so that you can build your dinamic queries using your preferred language.
6 |
7 | == Velocity ==
8 |
9 | [http://velocity.apache.org Velocity] is a template engine that can be used for many purposes.
10 |
11 | If you are not familiar with apache velocity, you can learn it from its documentation site:
12 |
13 | To install the plugin in your project, add the dependency:
14 |
15 | {{{
16 |
17 | ...
18 |
19 | org.mybatis.scripting
20 | mybatis-velocity
21 | xxx
22 |
23 | ...
24 |
25 | }}}
26 |
27 | Register the language driver alias in your mybatis configuration file:
28 |
29 | {{{
30 |
31 | ...
32 |
33 |
34 |
35 | ...
36 |
37 | }}}
38 |
39 | Optional: Set the velocity as your default scripting language:
40 |
41 | {{{
42 |
43 | ...
44 |
45 |
46 |
47 | ...
48 |
49 | }}}
50 |
51 | Now you can write dynamic statements like this one:
52 |
53 | {{{
54 |
60 | }}}
61 |
62 | For further info read the [http://mybatis.github.io/velocity-scripting/ manual]
--------------------------------------------------------------------------------
/wiki/UserGuides.wiki:
--------------------------------------------------------------------------------
1 | #summary MyBatis reference guides and javadocs.
2 |
3 | Follows below the list of URL of each sub-project where reference documentation, samples, javadocs and project reports can be found.
4 |
5 | = !MyBatis =
6 |
7 | * *[http://www.mybatis.org/core MyBatis Core Framework]*
8 |
9 | = Tools =
10 |
11 | * *[http://mybatis.org/generator/ MyBatis Generator Tool]*
12 |
13 | * *[http://www.mybatis.org/migrations MyBatis Schema Migrations Tool]* - for database change management
14 |
15 | * *[http://mybatis.org/maven-migration-plugin/ Schema Migrations Migrations plugin for Apache Maven]*
16 |
17 | = Extensions =
18 |
19 | == DI/IoC ==
20 |
21 | * *[http://www.mybatis.org/spring MyBatis Spring Integration]*
22 |
23 | * *[http://www.mybatis.org/guice MyBatis Guice Integration]*
24 |
25 | == Language integrations ==
26 |
27 | * *[http://www.mybatis.org/scala MyBatis Scala Integration]*
28 |
29 | == Caches ==
30 |
31 | * *[http://www.mybatis.org/caches/oscache MyBatis OSCache Extension]*
32 |
33 | * *[http://www.mybatis.org/caches/ehcache MyBatis EhCache Extension]*
34 |
35 | * *[http://www.mybatis.org/caches/hazelcast MyBatis Hazelcast Extensions]*
36 |
37 | == Stripting ==
38 |
39 | * *[http://www.mybatis.org/scripting/velocity MyBatis Velocity Extension]*
40 |
41 | = Samples =
42 |
43 | * *[http://www.mybatis.org/spring/sample.html JPetStore 6]*
44 |
45 | == Can't find what you need? ==
46 | Try searching for old version or different language guides in the downloads which can be found [http://code.google.com/p/mybatis/downloads/list?can=3&q=Docs here].
47 |
48 | ==Available Languages==
49 | * English
50 | * 한국어 (Korean)
51 | * 简体中文 (Simplified Chinese)
52 | * Español (Spanish)
53 | * 日本語 (Japanese)
54 |
55 | If you have the ability and desire to translate into other languages we would love to add more to the above list.
56 |
57 | For those of you living on the edge and helping the community to test out new features with snapshot releases you can find their user guides in svn.
--------------------------------------------------------------------------------
/wiki/Generator.wiki:
--------------------------------------------------------------------------------
1 | #summary An introduction to the code generation tool for MyBatis
2 |
3 | == Introduction to !MyBatis Generator ==
4 |
5 | !MyBatis Generator is a code generator for !MyBatis. !MyBatis Generator will introspect a database table (or many tables) and will generate !MyBatis artifacts that can be used to access the table(s). This abates some of the initial nuisance of setting up objects and configuration files to interact with database tables. !MyBatis Generator seeks to make a major impact on the large percentage of database operations that are simple CRUD (Create, Retrieve, Update, Delete). You will still need to hand code SQL and objects for custom queries, or stored procedures.
6 |
7 | !MyBatis Generator will generate:
8 |
9 | * !SqlMap XML Files
10 | * Java Classes to match the primary key and fields of the table(s)
11 | * Java Client Classes that use the above objects (optional)
12 |
13 | !MyBatis Generator can run as a standalone JAR file, as an Ant task, a Maven plugin, or
14 | an Eclipse plugin.
15 |
16 | == Get !MyBatis Generator ==
17 |
18 | === Google Code ===
19 | !MyBatis generator is available from the !MyBatis site at http://code.google.com/p/mybatis/downloads/list?can=3&q=Product%3DGenerator The bundle includes documentation for the generator.
20 |
21 | === Maven ===
22 | !MyBatis generator is available in the Maven central repository at:
23 | ||*Group*||org.mybatis.generator||
24 | ||*Artifact*||mybatis-generator-maven-plugin||
25 | ||*Version*||1.3.2||
26 |
27 | === Eclipse ===
28 | !MyBatis generator is available as an Eclipse plugin and includes the extra
29 | capability of merging generated Java files as databases evolve. Documentation for
30 | !MyBatis generator is integrated into the Eclipse help system. To install the
31 | Eclipse plugin, configure a new Eclipse install repository and point to this location:
32 |
33 | http://mybatis.googlecode.com/svn/sub-projects/generator/trunk/eclipse/UpdateSite/
34 |
35 | The plugin is currently developed and compiled with Eclipse Indigo SR2. It is also tested on Eclipse Juno and known to work there.
--------------------------------------------------------------------------------
/wiki/Contribute.wiki:
--------------------------------------------------------------------------------
1 | #summary Description of how members of the community can contribute to the project.
2 |
3 | = Get Involved =
4 |
5 | There are many ways to get involved.
6 |
7 | * *Be active and helpful on the mailing lists*
8 |
9 | * *Find bugs*
10 | * Submit issues with failing unit tests
11 | * Submit patches that make the tests pass
12 |
13 | * *Create a new feature or modification*
14 | * Discuss your changes on the user mailing list to get feedback from the community
15 | * Submit new feature to the issue tracking system with passing tests
16 | * Attach the patch file (or even just the complete files if that works... we can diff easily enough)
17 |
18 | * *Write documentation*
19 | * Submit documentation contributions or changes directly in the body of the issue (which supports wiki markup). We'll add it to the official guide.
20 |
21 | = Copyright of contributions =
22 |
23 | * Everything you can find it this project is licensed under the Apache Software License 2.0
24 |
25 | * Every contribution you do *must* be licensed under the Apache Software License 2.0. Otherwise we will not be able to accept it.
26 |
27 | * Please make sure that all the new files you create hold the following header:
28 |
29 | {{{
30 | /*
31 | * Copyright [year] the original author or authors.
32 | *
33 | * Licensed under the Apache License, Version 2.0 (the "License");
34 | * you may not use this file except in compliance with the License.
35 | * You may obtain a copy of the License at
36 | *
37 | * http://www.apache.org/licenses/LICENSE-2.0
38 | *
39 | * Unless required by applicable law or agreed to in writing, software
40 | * distributed under the License is distributed on an "AS IS" BASIS,
41 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42 | * See the License for the specific language governing permissions and
43 | * limitations under the License.
44 | */
45 | }}}
46 |
47 | * You are the author of your contributions and will always be, so you can add a @author tag with your name to the code you create.
--------------------------------------------------------------------------------
/wiki/svn2git.wiki:
--------------------------------------------------------------------------------
1 | #summary One-sentence summary of this page.
2 |
3 | = IDs =
4 |
5 | {{{
6 | bgoodin = Brandon Goodin
7 | brandon.goodin = Brandon Goodin
8 | cbegin = Clinton Begin
9 | clinton.begin = Clinton Begin
10 | clinton.begin@gmail.com = Clinton Begin
11 | chengt@gmail.com = Tim Chen
12 | christian.poitras@ircm.qc.ca = Christian Poitras
13 | eduardo.macarron = Eduardo Macarron
14 | eduardo.macarron@gmail.com = Eduardo Macarron
15 | gbayon = Gilles Bayon
16 | gus4000@gmail.com = Andrew Gustafson
17 | harawata@gmail.com = Iwao AVE!
18 | herman.bovens@gmail.com = Herman Bovens
19 | hpresnall = Hunter Presnall
20 | jeffgbutler = Jeff Butler
21 | jeffgbutler@gmail.com = Jeff Butler
22 | jgbutler = Jeff Butler
23 | larry.meadors = Larry Meadors
24 | lmeadors = Larry Meadors
25 | marco.speranza79 = Marco Speranza
26 | marco.speranza79@gmail.com = Marco Speranza
27 | mmccurrey = Michael McCurrey
28 | mnesarco = Frank Martínez
29 | mnesarco@gmail.com = Frank Martínez
30 | nathan.maves = Nathan Maves
31 | nathan.maves@gmail.com = Nathan Maves
32 | nmaves = Nathan Maves
33 | putthibongb = Putthibong Boonbong
34 | simone.tripodi = Simone Tripodi
35 | simone.tripodi@gmail.com = Simone Tripodi
36 | simonetripodi = Simone Tripodi
37 | jtirsen = Jon Tirsen
38 | roberto = Roberto Rabe
39 | sboden = Sven Boden
40 | schallm = Michael Schall
41 | kai = Kai Grabfelder
42 | husted = Ted Husted
43 | rgrabowski = Ron Grabowski
44 | hobbss =
45 | svm =
46 | }}}
--------------------------------------------------------------------------------
/wiki/Test.wiki:
--------------------------------------------------------------------------------
1 | #summary How to create a Test to submit an issue.
2 |
3 | We appreciate that uses fill issues with bug reports, feature suggestions or new ideas. This is in fact the basis of the evoution of !MyBatis.
4 |
5 | To facilitate the adoption of your idea or to demonstrate a failure we would like to ask you to provide unit tests. A test will make life easier for everyone, it will be easier for you to explain the idea or problem and for team members to understand it and take an action.
6 |
7 | = Base Unit Test =
8 |
9 | Even if you are not familiarized with unit testing you will see that coding a unit test is an easy task.
10 |
11 | !MyBatis provides a sample base test that serves as a basis for your test. Check it out from here http://mybatis.googlecode.com/svn/trunk/src/test/java/org/apache/ibatis/submitted/basetest/
12 |
13 | This test is quite simple, it is composed by the following files:
14 | * A JUnit test program called !BaseTest
15 | * A POJO called User
16 | * A Mapper interface called Mapper
17 | * A mybatis-config file called mybatis-config.xml
18 | * A mapper XML file called Mapper.xml
19 | * A database script called CreateDB.sql
20 |
21 | This is how it works.
22 | * !BaseTest.setUp() method builds an !SqlSessionFactory that uses an in-memory HSQLDB database:
23 | {{{
24 | Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/basetest/mybatis-config.xml");
25 | sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
26 | reader.close();
27 | }}}
28 | * Then it populates the database with the content of CreateDB.sql file:
29 | {{{
30 | SqlSession session = sqlSessionFactory.openSession();
31 | Connection conn = session.getConnection();
32 | reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/basetest/CreateDB.sql");
33 | ScriptRunner runner = new ScriptRunner(conn);
34 | runner.setErrorLogWriter(null);
35 | runner.runScript(reader);
36 | reader.close();
37 | session.close();
38 | }}}
39 | * !BaseTest.shouldGetAUser() gets a mapper and uses it to retrieve a User. Then it calls JUnit's method assertEquals to check that the returned data is what was expected:
40 | {{{
41 | @Test
42 | public void shouldGetAUser() {
43 | SqlSession sqlSession = sqlSessionFactory.openSession();
44 | try {
45 | Mapper mapper = sqlSession.getMapper(Mapper.class);
46 | User user = mapper.getUser(1);
47 | Assert.assertEquals("User1", user.getName());
48 | } finally {
49 | sqlSession.close();
50 | }
51 | }
52 | }}}
53 |
54 | = Code your own Test =
55 |
56 | Taking base test as a basis these are the modifications you should do to build your own test:
57 | * Change package name from org.apache.ibatis.submitted.basetest to org.apache.ibatis.submitted.xxx where xxx is your test name
58 | * Note that you should also change String literals that hold the package in !BaseTest#setUp (twice), in mybatis-config and in Mapper.xml.
59 | * Change database name both in !BaseTest and mybatis-config.xml from jdbc:hsqldb:mem:basetest to jdbc:hsqldb:mem:xxx where xxx is your test name.
60 | * Run the test. It should finish OK.
61 | * Add your own code.
62 | * Once you are done, create a patch with all your changes (including the test) and attach it to an issue.
--------------------------------------------------------------------------------
/wiki/ResultHandlerExample.wiki:
--------------------------------------------------------------------------------
1 | #summary Handle results from complex queries
2 | #labels Phase-Implementation
3 |
4 | = Introduction =
5 |
6 | Some SQL queries return complex information that cannot be described by simple XML or annotations.
7 | For this special case, MyBatis has a ResultHandler interface that gives you great control over the ResultSet returned by the SQL query.
8 |
9 |
10 | == ResultHandler example ==
11 |
12 | MyBatis can populate beans before calling ResultHandler's only method: handleResult(ResultContext).
13 | First, let's define a complex object that MyBatis will populate.
14 |
15 | {{{
16 | public interface GrandFatherMapper {
17 | public static class GrandFatherWithGrandChildren {
18 | public GrandFather grandFather;
19 | public Child child;
20 | }
21 | public void selectComplex(ResultHandler handler);
22 | }
23 | }}}
24 |
25 | Then we will create a resultMap and a select that will use that object.
26 |
27 | {{{
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
45 |
46 | }}}
47 |
48 | Finally, let's call that select with a ResultHandler to obtain a Map of grand fathers and their childrens.
49 |
50 | {{{
51 | public Map> selectGrandFathersWithChildren() {
52 | SqlSession sqlSession = sqlSessionFactory.openSession();
53 | try {
54 | class MyResultHandler implements ResultHandler {
55 | Map> grandFatherWithChildren = new HashMap>();
56 | @Override
57 | public void handleResult(ResultContext context) {
58 | final GrandFatherWithGrandChildren complex = (GrandFatherWithGrandChildren)context.getResultObject();
59 | if (!grandFatherWithChildren.containsKey(complex.grandFather)) {
60 | grandFatherWithChildren.put(complex.grandFather, new ArrayList());
61 | }
62 | grandFatherWithChildren.get(complex.grandFather).add(complex.child);
63 | }
64 | };
65 | MyResultHandler handler = new MyResultHandler();
66 | GrandFatherMapper grandFatherMapper = sqlSession.getMapper(GrandFatherMapper.class);
67 | grandFatherMapper.selectComplex(handler);
68 |
69 | return handler.grandFatherWithChildren;
70 | } finally {
71 | sqlSession.close();
72 | }
73 | }
74 | }}}
--------------------------------------------------------------------------------
/wiki/FaqJapanese.wiki:
--------------------------------------------------------------------------------
1 | =FAQ : よくある質問=
2 |
3 | ===#{...} と ${...} の違いは?===
4 | #{...} は java.sql.PreparedStatement のプレースホルダーとして扱われます。一方、${...} はステートメント生成前に単なる文字列として置換されます。SQL ステートメント中でプレースホルダーが使える場所は限られているので、この違いを理解しておくことは重要です。
5 | 例えば、テーブル名を指定するためにプレースホルダーを使用することはできません。
6 | {{{
7 | Map parms = new HashMap();
8 | parms.put("table", "foo");
9 | parms.put("criteria", 37);
10 | List