2014-12-17 17:09 GMT+01:00 <[email protected]>:
>
>
> But I'd prefer the store() way, and I see no reason for it not to be there.
>

The reason is that UpdatableRecords can only exist in the presence of a
primary key. If there is no primary key, jOOQ cannot know if a value should
be updated or inserted. INSERT is always possible but UPDATE isn't...

In any case, you will probably not design your schema without primary keys,
so this might not be an issue... If you do want to have updatable tables
without primary keys, you can tell the code generator to produce "synthetic
primary keys" as documented here:
http://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/

  <!-- A regular expression matching all columns that participate in
"synthetic" primary keys,
       which should be placed on generated UpdatableRecords, to be used with

        - UpdatableRecord.store()
        - UpdatableRecord.update()
        - UpdatableRecord.delete()
        - UpdatableRecord.refresh()

       Synthetic primary keys will override existing primary keys. -->
  <syntheticPrimaryKeys>SCHEMA\.TABLE\.COLUMN(1|2)</syntheticPrimaryKeys>

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