Hi Ryan,

Unlike most JPA-based ORMs, jOOQ cleanly separates querying from mapping.
There is no implicit knowledge about relations between your document and
annotation tables, unless you explicitly join the two tables in your SQL
statement. Once the result is fetched, you have lots of means of mapping
the flat result set onto your custom domain model (i.e. your existing
POJOs). jOOQ supports a default mapping algorithm that is described here:
http://www.jooq.org/javadoc/latest/org/jooq/impl/DefaultRecordMapper.html

Since jOOQ 3.1, you can globally override the DefaultRecordMapper and
inject your own mapping strategies, using tools like
- http://modelmapper.org
- https://code.google.com/p/orika
- Your own implementation of jOOQ's RecordMapper

Some documentation:
http://www.jooq.org/doc/3.1/manual/sql-execution/fetching/recordmapper
http://www.jooq.org/doc/3.1/manual/sql-execution/fetching/pojos
http://www.jooq.org/doc/3.1/manual/sql-execution/fetching/pojos-with-recordmapper-provider

Hope this helps
Lukas


2013/7/19 Ryan Cornia <[email protected]>

> I have an application with existing POJO's (and many hand coded SQL
> statements) I would like to try JOOQ on.
>
> I can't find any examples of how to do this? Do I need to configure JOOQ
> programmatically so it knows, for instance, I have a Document table and
> Annotation table, and how they are related? Where would I find an example
> of that?
>
> Or is code generation needed to get full feature type checking queries?
> Right now the data is mostly read only, so I am looking for the most
> maintainable way to do queries.
>
> Thanks,
> Ryan
>
>  --
> 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.
>
>
>

-- 
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