src/org/nutz/dao/util/Daos.java
public static void createTablesInPackage(final Dao dao, String packageName, boolean force,TablesFilter filter) {
        List<Class<?>> list = new ArrayList<Class<?>>();
        for(Class<?> klass: Scans.me().scanPackage(packageName)) {
            Table table = Mirror.me(klass).getAnnotation(Table.class);
            if (table != null && filter.match(klass,table))
                list.add(klass);
        }
        createTables(dao,list,force);
    }
public static void createTablesInPackage(final Dao dao, String packageName, boolean force,TablesFilter filter) {
        List<Class<?>> list = new ArrayList<Class<?>>();
        for(Class<?> klass: Scans.me().scanPackage(packageName)) {
            Table table = Mirror.me(klass).getAnnotation(Table.class);
            if (table != null && filter.match(klass,table))
                list.add(klass);
        }
        createTables(dao,list,force);
    }
为特定package下带@Table注解的类调用dao.create(XXX.class, force),
批量建表,优先建立带@ManyMany的表

@param dao
Dao实例
@param packageName
package名称,自动包含子类
@param force
如果表存在,是否先删后建
@param filter
定义过滤器排除不需要自动创建的表