From 95f024cc4e021a39d41e091b0ae0908ce71af334 Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Wed, 5 Oct 2022 15:05:09 +0530 Subject: [PATCH 1/3] Moved the Application ORMSettings details to a separate page for the LD-159 --- .../application/_attributes/maillistener.md | 2 +- .../application/_attributes/ormsettings.md | 28 +------- .../58.application-ORM-configurations/page.md | 66 +++++++++++++++++++ .../08.extension-extension-provider/page.md | 6 +- 4 files changed, 71 insertions(+), 31 deletions(-) create mode 100644 docs/04.guides/04.cookbooks/58.application-ORM-configurations/page.md diff --git a/docs/03.reference/02.tags/application/_attributes/maillistener.md b/docs/03.reference/02.tags/application/_attributes/maillistener.md index 375b99678..05b93aedb 100644 --- a/docs/03.reference/02.tags/application/_attributes/maillistener.md +++ b/docs/03.reference/02.tags/application/_attributes/maillistener.md @@ -1,3 +1,3 @@ -Defines a mail listeners for cfmail +Defines a mail listeners for [[tag-mail]] See the [[cookbook-mail-listeners]] for details \ No newline at end of file diff --git a/docs/03.reference/02.tags/application/_attributes/ormsettings.md b/docs/03.reference/02.tags/application/_attributes/ormsettings.md index 8dc1143ed..155738f3b 100644 --- a/docs/03.reference/02.tags/application/_attributes/ormsettings.md +++ b/docs/03.reference/02.tags/application/_attributes/ormsettings.md @@ -1,27 +1,3 @@ -A struct that defines all the ORM settings, the following keys are supported: +A struct that defines all the ORM settings, -- **autogenmap(default:true; autogenmap=false is not supported yet):** Specifies whether Lucee should automatically generate mapping for the persistent CFCs. If autogenmap=false, mapping should be provided in the form of "{cfc-name}.cfc.hbm.xml" files. -- **automanageSession(default:true; not supported yet):** Lets you specify if Lucee must manage Hibernate session automatically. If enabled: Lucee manages the session completely. That is, it decides when to flush the session, when to clear the session, and when to close the session. If disabled: The application is responsible for managing flushing, clearing, or closing of the session. The only exception is (in the case of transaction), when the transaction commits, the application flushes the session. Lucee closes the ORM session at the end of request irrespective of this flag being enabled or disabled. -- **cacheconfig:** Specifies the location of the configuration file that should be used by the secondary cache provider.This setting is used only when secondarycacheenabled=true. -- **cacheprovider:** Specifies the cache provider that should be used by ORM as secondary cache. -- **catalog:** Specifies the default Catalog that should be used by ORM. -- **cfclocation:** Specifies the directory (or array of directories) that should be used by Lucee to search for persistent CFCs to generate the mapping. If cfclocation is set, Lucee looks at only the paths specified in it. If it is not set, Lucee looks at the application directory, its sub-directories, and its mapped directories to search for persistent CFCs. -- **datasource:** Specifies the data source that should be used by ORM. If it is not specified here, then the data source specified for the application is picked up. -- **dbcreate(default:none):** Hibernate can automatically create the tables for your application in the database. dbCreate takes the following **values:** - - - **update:** Setting this value creates the table if it does not exist or update the table if it exists. - - - **dropcreate:** Setting this value drops the table if it exists and then creates it. - - - **none:** Setting this value does not change anything in the database schema. -- **dialect:** Specifies the dialect.Lucee supports the following dialects: [Cache 2007.1, Cache71, Cache 2007.1, DB2, DB2/390, DB2/400, DB2390, DB2400, DB2AS400, DB2OS390, DataDirectOracle9, Derby, Firebird, FrontBase, H2, H2DB, HSQL, HSQLDB, Informix, Ingres, Interbase, JDataStore, MSSQL, Mckoi, MckoiSQL, MicrosoftSQLServer, Mimer, MimerSQL, MySQL, MySQL/InnoDB, MySQL/MyISAM, MySQL5, MySQL5/InnoDB, MySQL5InnoDB, MySQLInnoDB, MySQLMyISAM, MySQLwithInnoDB, MySQLwithMyISAM, Oracle, Oracle10g, Oracle8i, Oracle9, Oracle9i, Pointbase, PostgreSQL, PostgresPlus, Progress, SAPDB, SQLServer, Sybase, Sybase11, SybaseASE15, SybaseAnywhere, com.ddtek.jdbc.db2.DB2Driver, com.microsoft.jdbc.sqlserver.SQLServerDriver, oracle.jdbc.driver.OracleDriver, org.firebirdsql.jdbc.FBDriver, org.gjt.mm.mysql.Driver, org.h2.Driver, org.hsqldb.jdbcDriver, org.postgresql.Driver] -- **eventHandling(default:false):** Specifies whether ORM Event callbacks should be given. -- **flushatrequestend(default:true):** Specifies whether ormflush should be called automatically at request end. If flushatrequestend is false, ormflush is not called automatically at request end. -- **logSQL(default:false):** Specifies whether the SQL queries that are executed by ORM will be logged. If LogSQL=true, the SQL queries are logged to the console. -- **ormconfig:** The Hibernate configuration file. This file contains various configuration parameters like, dialect, cache settings, and mapping files that are required for the application. For more details, see . The settings defined in the ormsettings override the settings defined in the Hibernate Configuration XML file.The connection information in the Hibernate Configuration XML file is however ignored because Lucee uses its own connection pool. You will need to use this only when you need to use a hibernate setting that is not available using ormsetting. -- **savemapping(default:false):** Specifies whether the generated Hibernate mapping file has to be saved to disc. If you set the value to true, the Hibernate mapping XML file is saved with the filename "CFC name".hbm.xml in the same directory as the CFC. If any value of savemapping is specified in CFC, it will override the value specified in the ormsetting. -- **schema:** Specifies the default Schema that should be used by ORM. -- **secondarycacheenabled(default:false):** Specifies whether secondary caching should be enabled -- **skipCFCWithError(default:false;not implemented yet):** Lets you specify if Lucee must skip the CFCs that have errors. If set to true, Lucee ignores the CFCs that have errors. -- **sqlscript:** Path to the SQL script file that gets executed after ORM is initialized. This applies if dbcreate is set to dropcreate. This must be the absolute file path or the path relative to the application.The SQL script file lets you populate the tables before the application is accessed. -- **useDBForMapping(default:true):** Specifies whether the database has to be inspected to identify the missing information required to generate the Hibernate mapping. The database is inspected to get the column data type, primary key and foreign key information. \ No newline at end of file +see the [[cookbook-Appication-ORMSettings]] for the details \ No newline at end of file diff --git a/docs/04.guides/04.cookbooks/58.application-ORM-configurations/page.md b/docs/04.guides/04.cookbooks/58.application-ORM-configurations/page.md new file mode 100644 index 000000000..45922c8cd --- /dev/null +++ b/docs/04.guides/04.cookbooks/58.application-ORM-configurations/page.md @@ -0,0 +1,66 @@ +--- +title: ORM Settings configuration via Application +id: cookbook-Appication-ORMSettings +related: +- tag-application +categories: +- application +- orm +description: detailed description for the ORM Settings configured via Appication.cfc/cfapplication +--- + +### Application ORM Settings configurations ### + +This page gives the detailed description of the ORM settings for the [[tag-application]] + +i.e.Application.cfc + +```luceescript +component { + this.name = "ORMTest"; + this.ORMEnabled = true; + + this.ormsettings.dbcreate = "update"; + this.ormsettings.dialect = "MicrosoftSQLServer"; +} + +OR +component { + this.name = "ORMTest"; + this.ORMEnabled = true; + + this.ormsettings = { + dbcreate : "update", + dialect : "MicrosoftSQLServer" + } +} +``` + +i.e.<cfapplication> + +```lucee + +``` + + +Key | Description | default +-------------- | ----------------- | ----------------- +autogenmap | **(default:true; autogenmap=false is not supported yet.)** Specifies whether Lucee should automatically generate mapping for the persistent CFCs. If autogenmap=false, mapping should be provided in the form of "{cfc-name}.cfc.hbm.xml" files. | true +autoManageSession | **(default:true; not supported yet).** Lets you specify if Lucee must manage Hibernate session automatically. If enabled: Lucee manages the session completely. That is, it decides when to flush the session, when to clear the session, and when to close the session. If disabled: The application is responsible for managing flushing, clearing, or closing of the session. The only exception is (in the case of transaction), when the transaction commits, the application flushes the session. Lucee closes the ORM session at the end of request irrespective of this flag being enabled or disabled. | true +cacheConfig | Specifies the location of the configuration file that should be used by the secondary cache provider.This setting is used only when secondarycacheenabled=true. | | +cacheProvide | Specifies the cache provider that should be used by ORM as secondary cache. | | +catalog | Specifies the default Catalog that should be used by ORM. | | +cfclocation | Specifies the directory (or array of directories) that should be used by Lucee to search for persistent CFCs to generate the mapping. If cfclocation is set, Lucee looks at only the paths specified in it. If it is not set, Lucee looks at the application directory, its sub-directories, and its mapped directories to search for persistent CFCs. | | +datasource | Specifies the data source that should be used by ORM. If it is not specified here, then the data source specified for the application is picked up. | | +dbcreate | Hibernate can automatically create the tables for your application in the database. dbCreate takes the following values:
  • **update:** Setting this value creates the table if it does not exist or update the table if it exists.
  • **dropcreate:** Setting this value drops the table if it exists and then creates it.
  • **none:** Setting this value does not change anything in the database schema.
| none +dialect | Specifies the dialect.Lucee supports the following dialects: [Cache 2007.1, Cache71, Cache 2007.1, DB2, DB2/390, DB2/400, DB2390, DB2400, DB2AS400, DB2OS390, DataDirectOracle9, Derby, Firebird, FrontBase, H2, H2DB, HSQL, HSQLDB, Informix, Ingres, Interbase, JDataStore, MSSQL, Mckoi, MckoiSQL, MicrosoftSQLServer, Mimer, MimerSQL, MySQL, MySQL/InnoDB, MySQL/MyISAM, MySQL5, MySQL5/InnoDB, MySQL5InnoDB, MySQLInnoDB, MySQLMyISAM, MySQLwithInnoDB, MySQLwithMyISAM, Oracle, Oracle10g, Oracle8i, Oracle9, Oracle9i, Pointbase, PostgreSQL, PostgresPlus, Progress, SAPDB, SQLServer, Sybase, Sybase11, SybaseASE15, SybaseAnywhere, com.ddtek.jdbc.db2.DB2Driver, com.microsoft.jdbc.sqlserver.SQLServerDriver, oracle.jdbc.driver.OracleDriver, org.firebirdsql.jdbc.FBDriver, org.gjt.mm.mysql.Driver, org.h2.Driver, org.hsqldb.jdbcDriver, org.postgresql.Driver] | | +eventHandling | Specifies whether ORM Event callbacks should be given. | false +flushAtRequestEnd | Specifies whether ormflush should be called automatically at request end. If flushatrequestend is false, ormflush is not called automatically at request end. | true +logSQL | Specifies whether the SQL queries that are executed by ORM will be logged. If LogSQL=true, the SQL queries are logged to the console. | false +ormConfig | The Hibernate configuration file. This file contains various configuration parameters like, dialect, cache settings, and mapping files that are required for the application. For more details, see . The settings defined in the ormsettings override the settings defined in the Hibernate Configuration XML file.The connection information in the Hibernate Configuration XML file is however ignored because Lucee uses its own connection pool. You will need to use this only when you need to use a hibernate setting that is not available using ormsetting. | | +saveMapping | Specifies whether the generated Hibernate mapping file has to be saved to disc. If you set the value to true, the Hibernate mapping XML file is saved with the filename "CFC name".hbm.xml in the same directory as the CFC. If any value of savemapping is specified in CFC, it will override the value specified in the ormsetting. | false | +schema | Specifies the default Schema that should be used by ORM. | false | +secondaryCacheEnabled | Specifies whether secondary caching should be enabled | false | +skipCFCWithError | **(default:false;not implemented yet)** Lets you specify if Lucee must skip the CFCs that have errors. If set to true, Lucee ignores the CFCs that have errors. | false | +sqlscript | Path to the SQL script file that gets executed after ORM is initialized. This applies if dbcreate is set to dropcreate. This must be the absolute file path or the path relative to the application.The SQL script file lets you populate the tables before the application is accessed. +useDBForMapping | Specifies whether the database has to be inspected to identify the missing information required to generate the Hibernate mapping. The database is inspected to get the column data type, primary key and foreign key information. | true diff --git a/docs/04.guides/06.extensions/08.extension-extension-provider/page.md b/docs/04.guides/06.extensions/08.extension-extension-provider/page.md index e8b2421dc..00f8d64f2 100644 --- a/docs/04.guides/06.extensions/08.extension-extension-provider/page.md +++ b/docs/04.guides/06.extensions/08.extension-extension-provider/page.md @@ -7,7 +7,7 @@ id: extensions-extension-provider Extensions are provided by the Extension Provider. An Extension Provider is a webservice that obeys a certain interface described below. Extension Provider can easily be registered in the Lucee Administrator. All you have to do is to enter and save the URL address pointing to it. -Let’s have a look at the interface of the extension providers. As already said it is a webservice that can be programmed in any given technology. In our examples we are using a CFC (CF Component). +Let's have a look at the interface of the extension providers. As already said it is a webservice that can be programmed in any given technology. In our examples we are using a CFC (CF Component). ### Interface ### @@ -26,9 +26,7 @@ title | Title of the extension provider description | Description of the extension provider image | Link to an image url | URL for more information -mode | Defines how the Information of the ExtensionProvider is cached in the client (Lucee Administrator). Valid values are: -
  • develop - does not cache the result of the extension provider
  • -
  • production (or no value) - caches the result in the session scope of the consumer
+mode | Defines how the Information of the ExtensionProvider is cached in the client (Lucee Administrator). Valid values are:
  • develop - does not cache the result of the extension provider
  • production (or no value) - caches the result in the session scope of the consumer
### listApplications ### From 647d0e280fa7aeb7d21701f85cf8befa8cdb43af Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Wed, 5 Oct 2022 15:21:44 +0530 Subject: [PATCH 2/3] Correction --- .../02.tags/application/_attributes/ormsettings.md | 2 +- .../04.cookbooks/58.application-ORM-configurations/page.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/03.reference/02.tags/application/_attributes/ormsettings.md b/docs/03.reference/02.tags/application/_attributes/ormsettings.md index 155738f3b..5c76ec743 100644 --- a/docs/03.reference/02.tags/application/_attributes/ormsettings.md +++ b/docs/03.reference/02.tags/application/_attributes/ormsettings.md @@ -1,3 +1,3 @@ A struct that defines all the ORM settings, -see the [[cookbook-Appication-ORMSettings]] for the details \ No newline at end of file +see the [[cookbook-Application-ORMSettings]] for the details \ No newline at end of file diff --git a/docs/04.guides/04.cookbooks/58.application-ORM-configurations/page.md b/docs/04.guides/04.cookbooks/58.application-ORM-configurations/page.md index 45922c8cd..625966a66 100644 --- a/docs/04.guides/04.cookbooks/58.application-ORM-configurations/page.md +++ b/docs/04.guides/04.cookbooks/58.application-ORM-configurations/page.md @@ -1,12 +1,12 @@ --- title: ORM Settings configuration via Application -id: cookbook-Appication-ORMSettings +id: cookbook-Application-ORMSettings related: - tag-application categories: - application - orm -description: detailed description for the ORM Settings configured via Appication.cfc/cfapplication +description: detailed description for the ORM Settings configured via Application.cfc/cfapplication --- ### Application ORM Settings configurations ### From b00af4f83cdec20948649eb0ff7f237d7cf8692c Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Wed, 5 Oct 2022 15:23:07 +0530 Subject: [PATCH 3/3] removed the white space --- .../04.cookbooks/58.application-ORM-configurations/page.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/04.guides/04.cookbooks/58.application-ORM-configurations/page.md b/docs/04.guides/04.cookbooks/58.application-ORM-configurations/page.md index 625966a66..59dbc82dd 100644 --- a/docs/04.guides/04.cookbooks/58.application-ORM-configurations/page.md +++ b/docs/04.guides/04.cookbooks/58.application-ORM-configurations/page.md @@ -42,7 +42,6 @@ i.e.<cfapplication> ``` - Key | Description | default -------------- | ----------------- | ----------------- autogenmap | **(default:true; autogenmap=false is not supported yet.)** Specifies whether Lucee should automatically generate mapping for the persistent CFCs. If autogenmap=false, mapping should be provided in the form of "{cfc-name}.cfc.hbm.xml" files. | true