Hello Pavol, Thanks for investigating this. I have registered #2294 for this problem: https://github.com/jOOQ/jOOQ/issues/2294
Indeed, some generator configuration flags cannot be combined in arbitrary ways. Setting daos=true requires relations=true. There are other inter-dependencies, which should probably be better formalised and documented. I have registered feature request #2297 for an improved documentation: https://github.com/jOOQ/jOOQ/issues/2297 Cheers Lukas 2013/3/1 Pavol Zibrita <[email protected]> > Hi again. > > So I found out that I have to set the 'relations' flag to true for > generator to generate updatable records. > > Sorry for spamming. > > Best regards, > Pavol > > PS: so far, great tool. Keep the good work and thanks! > > > On Friday, March 1, 2013 9:37:49 AM UTC-5, Pavol Zibrita wrote: >> >> Hi >> >> I found the reason for that. It is that jooq does not recognize the >> primary keys of tables, and so the records are not Updatable records, but >> only TableRecords. >> Now, is there anything I can do about this? Actually, I need the DAO only >> for searching, no updating or inserting. >> >> It seems to me, that most of the tables have composite primary key. Can >> this be the problem that jooq cannot handle? Is there anything I can do to >> make the >> records updatable by generator? I cannot change anything in db, >> unfortunately... >> >> Best regards, >> Pavol >> >> PS: It would be fine to have something like SearchDAOImpl that has only >> find queries and could use the TableRecord and the DAOImpl would than have >> all of it. >> >> On Thursday, February 28, 2013 5:12:09 PM UTC-5, Pavol Zibrita wrote: >>> >>> Hi! >>> >>> I don't know what is wrong. When generating DAOs, the code does not >>> compile. Witout DAOs it is ok. >>> >>> SomethingDao.java:12: error: type argument SomethingRecord is not within >>> bounds of type-variable R >>> [javac] public class SomethingDaoextends org.jooq.impl.DAOImpl<com.* >>> *tables.records.**SomethingRecord, com.tables.pojos.Something, >>> java.lang.Integer> { >>> [javac] ** ** >>> ** ^ >>> [javac] where R is a type-variable: >>> [javac] R extends UpdatableRecord<R> declared in class DAOImpl >>> >>> config: >>> <generator> >>> <name>org.jooq.util.**DefaultGenerator</name> >>> <database> >>> <name>org.jooq.util.oracle.**OracleDatabase</name> >>> <includes>.*</includes> >>> <excludes></excludes> >>> <recordVersionFields></**recordVersionFields> >>> <recordTimestampFields></**recordTimestampFields> >>> <dateAsTimestamp>false</**dateAsTimestamp> >>> <unsignedTypes>true</**unsignedTypes> >>> <inputSchema>booker</**inputSchema> >>> </database> >>> <generate> >>> <relations>false</relations> >>> <navigationMethods>true</**navigationMethods> >>> <deprecated>true</deprecated> >>> <instanceFields>true</**instanceFields> >>> <generatedAnnotation>true</**generatedAnnotation> >>> <records>true</records> >>> <pojos>false</pojos> >>> <immutablePojos>false</**immutablePojos> >>> <interfaces>false</interfaces> >>> <daos>true</daos> >>> <jpaAnnotations>false</**jpaAnnotations> >>> <validationAnnotations>false</**validationAnnotations> >>> </generate> >>> <target> >>> <packageName>com</packageName> >>> <directory>./gen/</directory> >>> </target> >>> </generator> >>> >>> Thanks for any help, >>> Pavol >>> >>> PS: Just starting with jooq, I thought to give it a shot. >>> >>> -- > 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.
