How long will it take me to learn JPA?
JPA is designed to be extremely simple. You can view the entire Java Persistence API at http://java.sun.com/javaee/5/docs/api/index.html.
How long will it take me to learn the JDO APIs?
The JDO API is designed to be extremely simple. You can view the entire JDO API Javadoc.
What standard APIs do I need to be familiar with to use Kodo?
Aside from the Java Persistence and JDO APIs, you do not need to have any expertise in any APIs aside from the basic standard ones that the Java core library provides.
What is the fastest way to get going with Kodo?
Do you provide any example applications using Kodo?
Kodo ships with numerous sample applications that can be adapted for your needs. For an overview of the samples that come with the Kodo distribution, see Chapter 1, Kodo Sample Code.
How do I issue queries to the database using Kodo?
JPA specifies a query language called JPQL, which allows queries to be written in an object-centric, SQL-like syntax. See Chapter 10, JPA Query. JPA also offers the ability to directly execute SQL queries against the database. See Chapter 11, SQL Queries.
JDO specifies a query language called JDOQL, which allows queries to be written in an object-centric, Java-like syntax. See Chapter 11, Query. JDO also offers the ability to directly execute SQL queries against the database. See Chapter 17, SQL Queries.
How much more programming do I need to do to use Kodo?
One of the goals of Kodo's transparent persistence is to make the persistence code in your application as minimal and unintrusive as possible. Typically, you will only need to write in the transaction demarcation, object queries, and the addition of root objects to the database.
What advantages does Kodo have over other persistence APIs?
Kodo is much less intrusive than other persistence APIs, in that your code does not need to be constantly "polluted" with additional code to do things like traversing relations. In addition, Kodo's bytecode enhancement allows performance and scalability advantages that cannot be matched by other reflection-based persistence architectures, such as declarative "fetch groups", automatic change detection, and transparent relation traversal.
Can Kodo be used in conjunction with other applications that operate against the same database?
Yes. Kodo does not require that it have exclusive read or write access to your database. The only restriction is that some optimistic version strategies may need to be respected by other applications.
Does Kodo provide extensions to JPA?
As well as providing complete support for the core Java Persistence API set, Kodo does provide extensions for some advanced operations. The Reference Guide details these extensions.
Does Kodo provide extensions to the JDO API?
As well as providing complete support for the core JDO API, Kodo does provide API extensions for some advanced or JDBC-specific operations. The Reference Guide details these extensions.
How do I avoid vendor lock-in when using Kodo?
To avoid tying your application to any particular vendor, you should avoid using any non-standard API extensions. This will ensure that you can write your application in a way that will run in exactly the same way with any spec-compliant software.
Is the application that I write in Kodo portable to other JPA or JDO vendors?
Yes, provided that the vendor's implementation is truly compliant with the specification.
How does Kodo interact with the data access/transfer pattern (DAO / DTO)?
While you can wrap Kodo in the DAO pattern, most users find it easier to use Kodo APIs directly. Kodo provides much of DAO's functionality in a standardized and easy to use API set.
How does Kodo affect the build process of my application?
When using Java 5 or higher, Kodo does not require any changes to your build process. Under previous Java versions, or if you choose not to take advantage of Kodo's Java 5 runtime enhancement, you will have to run the Kodo enhancer after compiling your persistent classes. See Section 5.2, “Enhancement”.
What is bytecode enhancement?
Bytecode enhancement involves changing your compiled classes to mediate access to all the fields that are marked as persistent. See Section 5.2, “Enhancement”.
How can I debug enhanced persistent classes?
Enhanced classes retain their line number tables. This means that lines in stack traces will match those of your original Java source file. Furthermore, enhanced classes can be used by debuggers in exactly the same way as unenhanced classes.
Can I use Kodo without having to enhance my classes?
Kodo does not require bytecode enhancement to function,
although not using enhancement involves writing all your
persistent classes to implement the
What is the differences between data caching and query caching?
Data caching caches data from the database. Basically, it caches your persistent objects. Query caching caches the identifiers of query result objects. The next time you run the same query, Kodo uses the cached identifiers to look up the result objects from the data cache, rather than running a database query.
So, an example of where these are different are if you did a query for "salary > 100" and then a query for "salary > 1000", the second query would be run against the database (it couldn't use the prior cached query), but all of the retrieved objects would be in the data cache, so the data for them wouldn't need to be retrieved.
When using the mappingtool to create a schema for me, why does Kodo create a column called NAME0 for a field called name?
When Kodo automatically generates a column name for a field,
it ensures that the name fits within the limitations of your
database. This means that a long field name might be
truncated, and that fields whose names are database
keywords (such as
If the auto-generated column names bother you, you can
always manually edit your mapping information to control
exactly what your schema should look like, or plug in your
own mapping defaults through the