Home / 1.3
Name Modified Size InfoDownloads / Week
Parent folder
how_to_start.1.3.zip 2015-01-29 9.2 MB
thinkjava.dist.1.3.zip 2015-01-29 8.2 MB
thinkjava.docs.API.1.3.zip 2015-01-29 162.3 kB
thinkjava_struts_example_project.1.3.zip 2015-01-29 9.1 MB
readme.txt 2015-01-24 2.3 kB
Totals: 5 Items   26.6 MB 0
What's new in ThinkJava 1.3 ?
1.Added two annotation:
(1) @Table.
	It supports the persistent class name is different from the table name.
	Note: If you don't specify an @Table annotation for a specific persistent class, a default mapping to a database table of the same name as the class name is assumed.
(2) @Column.
	It supports the field name in persistent class is different from the column name.
	Note: If you don't specify an @Column(name='') annotation and assign the 'name' value for a specific field in the persistent class, a default mapping to a database column of the same name as the field name is assumed.

	Note:keeping the persistent class and the table has the same name,the field and the column has the same name is an easy way to develop your project with minimum configurations.
2.Fixed a bug that multi database connections are created while trying to get a lazy field value.
3.Fixed a bug about oracle paged query.
4.Removed the unnecessary constructor Model() in Model class,and the Model(Class clazz) is only constructor of the Model now. 
5.Even though the annotation @Column(insertable=false,updatable=false) is available now ,the method in Model:setUpdatable() and setIsInsertable() is still effective for the current Model instance,which is very useful when you need to contingently ignore some column values while inserting or updating . 
6.Added an example to close the database connection in the class test.thinkjava.struts.filter in example project 'thinkjava_struts_example_project',which shows how to manage connection closing matter more appropriately.
7.Now the method where(String conditions) like where("postId>1 and title like '%abc%') supports the property name of the persistent class.So the 'postId' in the foregoing method means the property 'postId' in the class 'Post'(See the 'thinkjava_example_project' to get more info about the class 'Post').
8.Added a method setParameter(int parameterIndex,Object value) in the class Model.This is an example for it:
	Model m=new Model(Post.class);
	m.where("postId>? and title like ?).orderBy("postId desc");
	m.setParameter(1,10);
	m.setParameter(2,"%aaa%");
	//or you can write the code like the following.
	//m.setParameter(1,10).setParameter(2,"%aaa%");
	List list=m.list();

by rockydan
23/1/2015
Source: readme.txt, updated 2015-01-24