Hello
2014-10-07 17:34 GMT+02:00 <[email protected]>:
> im trying to insert a new record in my table
>
> public void saveNewBook(ModelBook bookFilled) {
>>
>> ModelBook book1 = create.newRecord("MyTableOfBooks", bookFilled);
>> //in this part keep saying:
>
>
> *The method newRecord(Table<R>, Object) in the type DSLContext is not
> applicable for the arguments (String, ModelBook)*
>
Yes, you shouldn't pass a String as the first argument, but a table
reference. Preferably a table that you generated using the jOOQ code
generator
> but its the same way as this:
> http://www.jooq.org/doc/2.5/manual/sql-execution/fetching/pojos/
>
>
> so i cant do the:
>
>>
>> //book1.store();
>>
>> }
>
>
>
> in the tutorial say something about Book
>
>
> BookRecord book = create.newRecord(BOOK, myBook);
>
>
>
> where the hell they say something about creating the "BookRecord"? I did
> not find at least
>
"The hell" ;-) in step 3 of the tutorial, where the code generator is
explained
http://www.jooq.org/doc/latest/manual/getting-started/tutorials/jooq-in-7-steps/jooq-in-7-steps-step3/
As then explained later on, you can access all those generated objects via
static imports in your DAO:
http://www.jooq.org/doc/latest/manual/getting-started/tutorials/jooq-in-7-steps/jooq-in-7-steps-step6/
// For convenience, always static import your generated tables and//
jOOQ functions to decrease verbosity:import static
test.generated.Tables.*;import static org.jooq.impl.DSL.*;
We're aware of a couple of improvements that we can apply to the manual to
improve the experience new users have when they jump into the middle of the
manual - which can be confusing. In the mean time, I really suggest you run
the tutorial, and perhaps also consider this page called "how to read this
manual":
http://www.jooq.org/doc/latest/manual/getting-started/the-manual/
I don't mean to RTFM you :-) but that page explains a couple of things that
are assumed to be understood about the manual.
Hope this helps,
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/d/optout.