Hi,
How does the binder looks like for composite types? I've seen the JSON/GSON
binder example in the manual but I have some difficulties to figure out
what to put in the sql(), register(), get() and set() methods of the binder
when using composite types. I've found various examples of using UDTs and
examples of binding but I could not find a sample of using UDTs with
binding.
I want to bind my composite type to my own Java object and not to the UDT
object generated by Jooq.
For example with the following database schema:
CREATE TYPE mytype AS (
first TEXT,
second TEXT
);
CREATE TABLE mytable (
value mytype
);
And my own class for storing myType:
public class MyOwnType {
private String first;
private String second;
public MyOwnType(String f, String s) {
first = f;
second = s;
}
...
};
What does the binder needs to look like so that I can do
MytableRecord record = MyDsl.newRecord(MYTABLE);
record.setValue(new MyOwnType("1", "2"));
record.store();
Is there an example available somewhere or is there an easier way to do
this without creating my own binder?
Thanks,
Ralph.
--
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.