>
> You've probably run into this missing feature:
> https://github.com/jOOQ/jOOQ/issues/3643 
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FjOOQ%2FjOOQ%2Fissues%2F3643&sa=D&sntz=1&usg=AFQjCNEKdkMa6ihUR2Bdeq65u2pvRRgONw>


Thanks much -- good to know.  I'll give annotating the getters/setters a 
shot.

Note that we're not at all JPA - TCK compliant. The idea behind using JPA 
> annotations is mainly to avoid another set of proprietary jOOQ-annotations. 
> There are already too many SQL tools out there that introduce their own 
> @Column annotations. Any feedback on missing features or misinterpretation 
> of JPA is very welcome.


+1 to keeping it JPA-only, rather than other ORM annotations.

For what it's worth, I'm one of the Hibernate ORM committers, but I'm a 
firm believer in ORM not being the correct tool for every need.  The "ORM 
for complex CRUD and SQL for queries" pattern is something that's 
absolutely vital and is unfortunately widely missed.  I've been working 
with Hibernate + jOOQ and was really pleased to see the JPA integration. 
 That will be tremendously helpful and makes *a lot* of sense when 
integrating the two.  I'm eyeing a few ideas to better integrate with the 
annotations -- I might ping you with some thoughts, if you're interested.

Thanks for the response.

On Monday, January 19, 2015 at 1:04:33 PM UTC-5, Lukas Eder wrote:
>
> Hello,
>
> You've probably run into this missing feature:
> https://github.com/jOOQ/jOOQ/issues/3643
>
> The workaround would be to put the @Column annotations on getters or 
> setters.
>
> Note that we're not at all JPA - TCK compliant. The idea behind using JPA 
> annotations is mainly to avoid another set of proprietary jOOQ-annotations. 
> There are already too many SQL tools out there that introduce their own 
> @Column annotations. Any feedback on missing features or misinterpretation 
> of JPA is very welcome.
>
> Do note also that we only support @Column, not things like @ManyToOne, etc.
>
> Hope this helps for now,
> Lukas
>
>
> 2015-01-17 7:26 GMT+01:00 <[email protected] <javascript:>>:
>
>> I'm closely following 
>> http://www.jooq.org/doc/3.5/manual-single-page/#pojos, but cannot get 
>> #fetchInto to work.  I've tried every @Column JPA annotations (with and 
>> without the individual column selects) and the constructor (with and 
>> without @ConstructorProperties).  Am I missing anything obvious?
>>
>> Thanks for any help available!
>>
>> Here's the setup:
>>
>> public List<Notification> getNotifications(User user) {
>>         List<Notification> notifications = 
>> jooq.select(Notifications.NOTIFICATIONS.TITLE, 
>> Notifications.NOTIFICATIONS.BODY)
>>                 .from(Notifications.NOTIFICATIONS)
>>                 
>> .where(Notifications.NOTIFICATIONS.USER_ID.equal(user.getId()))
>>                 .fetchInto(Notification.class);
>>         return notifications;
>> }
>>
>>
>> @Entity
>> @Table(name = "notifications")
>> ...
>> public class Notification {
>> @Id
>> @GeneratedValue
>> private int id;
>>
>> @Column("title")
>> private String title;
>>
>> @Lob
>> @Column("body")
>> private String body;
>>
>> @ManyToOne(fetch = FetchType.LAZY, optional = false)
>> @JoinColumn(name = "user_id")
>> private User user;
>>
>>     public Notification() {
>>     }
>>
>>     @ConstructorProperties({"title", "body"})
>>     public Notification(String title, String body) {
>>         // jooq
>>         this.title = title;
>>         this.body = body;
>>     }
>>
>> public int getId() {
>> return id;
>> }
>>
>> public void setId(int id) {
>> this.id = id;
>> }
>>
>> public String getTitle() {
>> return title;
>> }
>>
>> public void setTitle(String title) {
>> this.title = title;
>> }
>>
>> public String getBody() {
>> return body;
>> }
>>
>> public void setBody(String body) {
>> this.body = body;
>> }
>>
>> public User getUser() {
>> return user;
>> }
>>
>> public void setUser(User user) {
>> this.user = user;
>> }
>> }
>>
>> -- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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

Reply via email to