You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Joe Baldwin <jf...@earthlink.net> on 2015/07/05 20:44:08 UTC

Cayenne Modeler - DbEntity Configuration - Catalog

What does Cayenne Modeler -> DbEntity Configuration -> Catalog  configuration field refer to?

(I could find no documentation on this.  The Javadocs simply note the name.)   It appears to pre-append a name to the database-name in the generated SQL.



Re: Cayenne Modeler - DbEntity Configuration - Catalog

Posted by Joe Baldwin <jf...@earthlink.net>.
I guess these definitions change a bit given the DBMS.

Some discussions claim that Catalog is like Database, while Schema is like Table.   That seems to fit with the Modeler’s implementation (MySQL), so that when the sql is generated it looks like

	 Catalog.Schema

MySQL Workbench has a section called “SCHEMAS”, which is, at the top level, a list of database names (or Catalogs).

I guess what I take away from this, is that if I change DBMS, I should test by inspecting the generated sql.

Thanks
Joe



> On Jul 5, 2015, at 8:25 PM, Andrus Adamchik <an...@objectstyle.org> wrote:
> 
> 
>> On Jul 5, 2015, at 2:44 PM, Joe Baldwin <jf...@earthlink.net> wrote:
>> 
>> What does Cayenne Modeler -> DbEntity Configuration -> Catalog  configuration field refer to?
>> 
>> (I could find no documentation on this.  The Javadocs simply note the name.)   It appears to pre-append a name to the database-name in the generated SQL.
> 
> Just like "schema", "catalog" is a database term standardized in JDBC (e.g. https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getCatalogs-- )
> 
> In the most general case, a database engine organizes its data in catalogs, catalogs contain schemas, schemas contain tables. Not all DBs support catalogs and schemas, and not all DB's are using these terms. E.g. in MySQL "database" is equal to JDBC "catalog" and there's no schema concept. Oracle supports both catalogs and schemas, etc.
> 
> Andrus


Re: Cayenne Modeler - DbEntity Configuration - Catalog

Posted by Andrus Adamchik <an...@objectstyle.org>.
> On Jul 5, 2015, at 2:44 PM, Joe Baldwin <jf...@earthlink.net> wrote:
> 
> What does Cayenne Modeler -> DbEntity Configuration -> Catalog  configuration field refer to?
> 
> (I could find no documentation on this.  The Javadocs simply note the name.)   It appears to pre-append a name to the database-name in the generated SQL.

Just like "schema", "catalog" is a database term standardized in JDBC (e.g. https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getCatalogs-- )

In the most general case, a database engine organizes its data in catalogs, catalogs contain schemas, schemas contain tables. Not all DBs support catalogs and schemas, and not all DB's are using these terms. E.g. in MySQL "database" is equal to JDBC "catalog" and there's no schema concept. Oracle supports both catalogs and schemas, etc.

Andrus

4.0 web.xml filter config files

Posted by Joe Baldwin <jf...@earthlink.net>.
While migrating to 4.0, I have found that the config files assoicatated with the filter cannot be located.  It appears that the location rules have changed again.

This doc

	https://cayenne.apache.org/docs/4.0/cayenne-guide/starting-cayenne.html#webapps

says:

"When started by the web container, it creates a instance of ServerRuntime and stores it in the ServletContext. Note that the name of Cayenne XML project file is derived from the "filter-name". In the example above CayenneFilter will look for an XML file "cayenne-project.xml". This can be overridden with "configuration-location" init parameter.”

But there is no example, and it is not clear how all of the config files are located.

Is there an example of where to store and locate these using the web.xml filter?