Digest for jooq-user@googlegroups.com - 1 update 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 - 1 update in 1 topic

http://groups.google.com/group/jooq-user/topics mailing list
[hidden email]: Nov 25 05:17AM -0800

I have some tables that are used to model multiple sets of things. They are
roughly
 
table sets (set_id, ...some stuff about the sets)
table set_contents(id, set_id, some stuff about the items)
 
I generate Record and a Pojo classes from the tables. These generate
getters and setters for the 'id' and 'setId' fields for set_contents.
 
When calling SetContentsRecord.into(SetContents.class) , the mapper seems
to recognise both setId(long) and setSetId(long) as setters for the
SetContents pojo, so the mapping breaks down.
 
For example, a record
 
SetContentsRecord(000, 111)
 
gets mapped to a pojo
 
SetContents(111, 111)
 
since the id is first set to 000, then 111 is copied into both the id and
the set_id fields.
 
It kinda makes sense that the mapping code would recognise setId(long) and
setSetId(long) as potential setters for set_id, I guess.
 
I'm afraid I don't have any good ideas about what a solution would look
like, or really if this even counts as a bug, since auto mapping is a
pretty dark art.
 
For me, I'm going to change my field names, but I thought others might be
interested - it certainly cost me a lot of time :)
 
Kind regards,
Joe
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].