On Mon, 2012-05-14 at 09:50 +0200, Lukas Eder wrote:
> Hello Murray,
> 
> > Thanks. That helps but fieldByName() really needs a tableName/aliasName
> > parameter to avoid ambiguity when two tables in the query have fields
> > with the same name.
> 
> You can pass as many qualifiers as you want to fieldByName(String...):
> 
> fieldByName("field_name");
> fieldByName("alias", "field_name");
> fieldByName("schema", "table", "field_name");
> fieldByName("catalog", "schema", "table", "field_name");
> 
> Agreed, the "fieldName" argument name to the method might be a bit 
> confusing...

Ah yes, I see that now in the example code:
http://www.jooq.org/javadoc/latest/org/jooq/impl/Factory.html#fieldByName%28java.lang.String...%29

Thanks. That is working great for me.

For people like me who don't read it all properly, maybe it would be
worthwhile to change "given its field name" to "given its field name
and, optionally, the table (or alias) name, and the schema and catalog
names."


-- 
Murray Cumming
[email protected]
www.murrayc.com
www.openismus.com

Reply via email to