Hello Ryan,

2013/5/16 <[email protected]>

> Hi,
>
> I am trying to use jooq without generated code.  So far, I've had luck
> substituting in  DSL.tableByName where I need a Table<Record>.  (Is this a
> good idea?).
>
> I was able to export code like this:
>
> CREATE.selectFrom(DSL.tableByName("mytable")).fetch().formatCSV(';')
>
> However, this import code won't compile because it requires a Table<R>
>
> CREATE.loadInto(DSL.tableByName("mytable")).loadCSV(new File("mytable.csv"
> )).fields(DSL.fieldByName("f1"), DSL.fieldByName("f2"), DSL.fieldByName(
> "f3"), DSL.fieldByName("f4")).execute();
>
Yes, I'm aware of this. There is a pending issue for this problem:
https://github.com/jOOQ/jOOQ/issues/1068

I'll give this some higher priority, hopefully to be fixed in 3.1

> Is there a way around this without code generation?
>
Yes, you could implement CustomTable. This was recently discussed here, in
another context:
https://groups.google.com/forum/?fromgroups#!searchin/jooq-user/CustomTable/jooq-user/7kyy0oU5I_A/tQ7WDRKNfoYJ

Another option is to try your luck using unsafe casts to
Table<TableRecord<?>>, or to the raw type Table. However, as #1068 states,
this hasn't been integration tested so far.

Cheers
Lukas

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to