Bee v1.7.0 release, support for object-oriented way multi-table query

Bee v1.7.0 increase object-oriented way multi-table query support.  
1. Support one to one, one to many, many-to-many.  
2. Support join (inner join), left join   , right join, no join.
3. single table, multi-table query without disturbing each other.  

Example:

public class Orders{
private Long id;
private String userid;
private String name;
private BigDecimal total;
private Timestamp createtime;
private String remark;
private String sequence;

<p> @JoinTable(mainField="userid", subField="name")
private User user;

// ... get,set methods.
 }
 
 public class User {
<p>
private Integer id;
private String email;
private String lastName;
private String name;
private String password;
private String username;

	// ... get,set methods.
 }
 
<p>public class MoreTableExam {

public static void main(String[] args) {
	MoreTable moreTable=BeeFactory.getHoneyFactory().getMoreTable();
	
 	Orders orders1=new Orders();
	orders1.setUserid("Bee"); 
	
	User user=new User();
	user.setEmail("[email protected]");
	orders1.setUser(user);
    List<Orders> list1 =moreTable.select(orders1);
    //... process list1
    }
 }

Generated SQL statement:

select * from orders join user on orders.userid=user.name where orders.userid=? and user.email=?   [values]: Bee,[email protected]

Bee describes the main features:

1. The interface is simple and easy to use. Suid method only four interfaces, corresponding to the SQL language select, update, insert, delete operation.
2.Javabean no comment, nor need xml mapping file, just pure Javabean can even get, set method can not.
3. The automatic filtering and null empty string, determined not to write a bunch of non-null code.
4. Dynamic / any combination of search criteria, do not need to prepare in advance dao interfaces, new query requirements do not modify or add interfaces.
5. Support direct return Json format query results; chain programming.
6. Support Java DB naming rules and custom, and a default implementation. 
7. support complex query object-oriented manner (simultaneously supports range queries, fuzzy query, in,>,> =, <, <=, packet, HAVING filtered, complex queries sorting, sorting, etc.).
8. Supports object-oriented way multi-table queries.

 

Guess you like

Origin www.oschina.net/news/112720/bee-1-7-0-released