Digest for jooq-user@googlegroups.com - 6 updates in 1 topic

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Digest for jooq-user@googlegroups.com - 6 updates in 1 topic

http://groups.google.com/group/jooq-user/topics mailing list
Knut Wannheden <[hidden email]>: Sep 12 02:37AM -0700

Hi Max,
 
Thank you for your message.
 
If you in the generator configuration haven't set <records>false</records>,
then the jOOQ code generator should automatically be generating
UpdatableRecordImpl subclasses for all your tables. You should then be able
to use these classes instead of your CustomRecord subclasses.
 
I hope this answers your question.
 
Knut
 
On Wednesday, September 11, 2019 at 9:54:07 PM UTC+2, Max Kremer wrote:
Max Kremer <[hidden email]>: Sep 12 07:02AM -0700

Sorry I should've pointed out that I'm not using the code generator.
 
On Wednesday, September 11, 2019 at 3:54:07 PM UTC-4, Max Kremer wrote:
Knut Wannheden <[hidden email]>: Sep 12 04:10PM +0200

Hi Max,
 
 
> Sorry I should've pointed out that I'm not using the code generator.
 
I see. Just out of curiosity: Why not? Do you also write TableImpl
subclasses by hand?
 
You could of course also have your classes extend UpdatableRecordImpl
rather than CustomRecord in the same way they get generated by the code
generator. For an (arbitrary) example see here:
https://github.com/jOOQ/jOOQ/blob/master/jOOQ-examples/jOOQ-kotlin-example/src/main/java/org/jooq/example/db/h2/tables/records/AuthorRecord.java
.
 
Hope this helps,
Knut
Max Kremer <[hidden email]>: Sep 12 07:20AM -0700

No specific reason other than we haven't really needed to.
 
Yes, we write our own TableImpl subclasses by hand but there are only 3-4
of them. Our application is mostly doing analytics and we rely on JOOQ as a
DSL for building queries (creating reusable chunks of SQL and combining
them, manipulating them etc...). So far JOOQ has been perfect for that. We
haven't had the requirement to do typical CRUD operations on
records/objects.... until now.
I looked at the UpdatableRecordImpl class but the internal docs say *"This
type is for JOOQ INTERNAL USE only. Do not reference directly"*
 
 
 
On Thursday, September 12, 2019 at 10:10:29 AM UTC-4, Knut Wannheden wrote:
Knut Wannheden <[hidden email]>: Sep 12 04:30PM +0200

Hi Max,
 
> records/objects.... until now.
> I looked at the UpdatableRecordImpl class but the internal docs say *"This
> type is for JOOQ INTERNAL USE only. Do not reference directly"*
 
When upgrading to a new jOOQ version I would recommend that you do run the
code generator and at least compare its output to your own hand-maintained
classes.
 
The TableImpl class has the same disclaimer in the Javadoc and both classes
are also annotated as @Internal. But extending either of these classes
(like the code generator does) is legitimate. But please note that, since
these are internal classes, the API could break in backwards incompatible
ways in a future minor release. This is not a problem if you are using the
code generator, as its API remains backwards compatible and it will always
generate classes matching TableImpl and UpdatableRecordImpl.
 
Regards,
Knut
Max Kremer <[hidden email]>: Sep 12 10:32AM -0400

Ok Thanks Knut, I'll explore the code generator.
Regards,
 
Max Kremer
 
http://www.trialfire.com
email: [hidden email]
twitter: @maxtrialfire
skype: maxkremer
 
 
 

 
On Thu, Sep 12, 2019 at 10:30 AM Knut Wannheden <[hidden email]>
wrote:
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to [hidden email].