QueryContainer propertiesname

Hi,
I’m doing this query :

publicationsQueryContainer = new QueryContainer("SELECT idpublish,title,[b]
publisher.name AS publishername 
[/b]FROM publish;

But System.out.println(publicationsQueryContainer.getContainerPropertyIds());

returns
[idpublish, title, name]

What is wrong???

Thanks

Hi,

It looks like you have forgotten to JOIN the ‘publisher’ table in your query, could this be the problem?

HTH,
/Jonatan

No, I’ve posted a part of the sentence sql.

The query works but the propertys are wrong!!



publicationsQueryContainer = new QueryContainer("SELECT idpublish,title,publisher.name AS publishername FROM publish INNER JOIN......

But i change with :



publicationsQueryContainer = new QueryContainer("SELECT idpublish,title,[b]
trim(publisher.name)
[/b] AS publishername FROM publish INNER JOIN......

System.out.println(publicationsQueryContainer.getContainerPropertyIds());

Works fine!!

Do you know what is happening in the first sentence?

Hi,

The problem is probably due to some bug in QueryContainer.

QueryContainer is very limited and will be replaced by
Vaadin SQLContainer
, so if you run into more problems, please consider switching to Vaadin SQLContainer.

/Jonatan