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 <[email protected]> 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

Reply via email to