Yeah, you'd need to select the specific adapter right in the generation dialog.
I guess we can make "autodetect" a default in that dialog. Andrus > On Oct 23, 2018, at 2:22 PM, Tony Giaccone <t...@giaccone.org> wrote: > > It might be useful for the Modeler to auto-detect as well because if you do > schema generation, you end up with different sql from the modeler than the > runtime. We started a dbdeploy process, and the sql generated was captured > from the modeler with the JDBC plain adaptor for the auto_pk, but then > instances also sequences because some of the it was originally done using > schema generation and it got confusing. > > > Tony > > On Tue, Oct 23, 2018 at 12:40 AM Andrus Adamchik <and...@objectstyle.org> > wrote: > >> If you don't set the adapter, Cayenne will auto-detect the DB type in >> runtime and install a proper adapter. Modeler doesn't do auto-detection, >> but the runtime does. In fact I don't remember when was the last time I had >> to specify an adapter explicitly. >> >> Andrus >> >> >>> On Oct 23, 2018, at 12:38 AM, Tony Giaccone <t...@giaccone.org> wrote: >>> >>> I understand that the kind of PK support that Cayenne uses depends on the >>> adaptor you use. When you use: >>> >>> org.apache.cayenne.dba.postgres.PostgresAdapter >>> >>> you get sequences, not the pk_auto table. >>> >>> I see where you can pick the adaptor as part of a database schema >>> generation. What's less clear to me, is what adaptor is used if cayenne >>> detects that a schema needs to be generated. Or more generally what >> causes >>> a dba adaptor to end up in the stack. >>> >>> Is there some kind of database detection that determines which adaptor >> get >>> used? >>> >>> I didn't think we were explicitly setting it to PostgresAdapter, and yet >> we >>> still ended up with sequences. Of course it's possible that someone on >> the >>> team did, so I don't want to rule that out as a possibility, but it >> occurs >>> to me that there might be some kind of detection especially in cases >> where >>> the schema is being generated "automatically". >>> >>> >>> Tony Giaccone >> >>