I don't know if it's politic to send you email, but there is no Issue panel in 
MetaModel's page on Github.
I've searched http://wiki.apache.org/metamodel/ with keyword "subquery", but 
there is no result.译
I used to think if org.apache.metamodel.query.Query implements 
org.apache.metamodel.schema.Table  so I can do it like 
dataContext.query().from(query), but it doesn't. 
So I ask you how to do SubQuery in MetaModel.

In fact, I think the api of MetaModel can do a big change, like this:
TableLike = dataContext.query().from(TableLike... tables)
TableLike = dataContext.query().from(TableLike... tables).select(ColumnLike... 
columns)
Filter = ColumnLike.operator(value)dataContext.query().from(TableLike... 
tables).select(ColumnLike... columns).where(Filter... 
filters).groupBy(ColumnLike... columns)
There are 3 main interfaces: TableLike , ColumnLike , Filter.
query, table, view are all TableLike;column in a query, column in a table are 
all ColumnLike;filter is generated by ColumnLike...
By the way, if the Column Type can be represent by the class of Column, things 
may be better.Maybe we can't make Column a generic class like Column<Integer>, 
because we can't use it like Column<Person>(wait, wait, wait, maybe we can if 
Person is just a java bean.... WOW, it seems that TableLike is in fact a 
subclass of ColumnLike).... So we can have some simple column class like 
IntegerColumn, StringColumn, DateColumn.....
AgainI don't know if it's politic to send you email. If it's not, ignore the 
email.  If it doesn't matter, will you reply me?                                
     

Reply via email to