[ 
https://issues.apache.org/jira/browse/METAMODEL-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14382503#comment-14382503
 ] 

Kasper Sørensen commented on METAMODEL-126:
-------------------------------------------

Hi there,

You're not supposed to instantiate MutableTable like this ... Only if you're 
implementing a new module anyways ...

What you need to do different is to start with a DataContext. From here you can 
explore the schemas/tables/columns using appropriate methods. You can also 
build your query based on the query() method which provides a bunch of 
convenient "shortcuts" in terms of query building.

> Issue using select all (*)
> --------------------------
>
>                 Key: METAMODEL-126
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-126
>             Project: Apache MetaModel
>          Issue Type: Bug
>            Reporter: Hosur Narahari
>
> I was writing a query like this.
> Query query = new Query().from("<table_name>").select("*");
> It throws MetaModelException : All select items ('*') not determinable with 
> from item: <table_name>
> Then I used as below : 
> MutableTable table = new MutableTable("<table_name>");
> Query query = new Query().from(table).select(*);
> It throws error saying Error in SQL syntax and when I printed the query it is 
> "FROM <table_name>".
> Am I missing something and using it wrong.
> P.S. : When I add all the columns in the table before constructing query it 
> works.
>  table.addColumn(new MutableColumn("<column1>"); etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to