Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Severity: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.2 GA
    • Fix Version/s: 5.3 RC
    • Component/s: Core SQL Storage
    • Impact type:
      Content model Change, Configuration format change
    • Upgrade notes:
      Hide
      - String fields are now by default mapped to a VARCHAR type. You can ALTER TABLE your old database to turn CLOBs into VARCHARs if needed.

      - To have a string field (ex: my:field) mapped to a CLOB, you must give it type="largetext" in the repository config extension point (org.nuxeo.ecm.core.repository.RepositoryService):
      <component name="...">
        <extension target="org.nuxeo.ecm.core.repository.RepositoryService" point="repository">
          <repository name="default" factory="org.nuxeo.ecm.core.storage.sql.coremodel.SQLRepositoryFactory">
            <repository>
              <schema>
                <field type="largetext">note</field>
                <field type="largetext">my:field</field>
                ...
              </schema>
              ...
            </repository>
          </repository>
        </extension>
      </component>
      Show
      - String fields are now by default mapped to a VARCHAR type. You can ALTER TABLE your old database to turn CLOBs into VARCHARs if needed. - To have a string field (ex: my:field) mapped to a CLOB, you must give it type="largetext" in the repository config extension point (org.nuxeo.ecm.core.repository.RepositoryService): <component name="...">   <extension target="org.nuxeo.ecm.core.repository.RepositoryService" point="repository">     <repository name="default" factory="org.nuxeo.ecm.core.storage.sql.coremodel.SQLRepositoryFactory">       <repository>         <schema>           <field type="largetext">note</field>           <field type="largetext">my:field</field>           ...         </schema>         ...       </repository>     </repository>   </extension> </component>

      Description

      In some cases the Oracle server fails to set values for some textual fields because the value uploaded is too large. The DB text columns are set to NCHARVAR2(2000), value apparently exceeded by the fields values. The limit of 2000 is intrinsic to Oracle NVARCHAR2, beyond that a NCLOB must be used.

        Issue Links

          Activity

          Show
          Florent Guillaume
          added a comment - Done. http://hg.nuxeo.org/nuxeo/nuxeo-core/rev/3c24e93cee31
          Hide
          Florent Guillaume
          added a comment - - edited

          Now, (together with NXP-3995 changes), string fields are by default some kind of VARCHAR column (depending on the database).
          This makes them comparable and orderable, but size-limited in some databases.

          To have a string field use a CLOB-like column, you have to specify it in the repository configuration, by giving it a "largetext" type, for instance:
          <schema>
          <field type="largetext">note</field>
          </schema>

          If the database already exists, VCS will use whatever exists in the database for the column type (VARCHAR or CLOB), which makes backward-compatibility possible.

          Show
          Florent Guillaume
          added a comment - - edited Now, (together with NXP-3995 changes), string fields are by default some kind of VARCHAR column (depending on the database). This makes them comparable and orderable, but size-limited in some databases. To have a string field use a CLOB-like column, you have to specify it in the repository configuration, by giving it a "largetext" type, for instance: <schema> <field type="largetext">note</field> </schema> If the database already exists, VCS will use whatever exists in the database for the column type (VARCHAR or CLOB), which makes backward-compatibility possible.
          Hide
          Florent Guillaume
          added a comment -

          Also see NXP-6189 for largetext on string arrays.

          Show
          Florent Guillaume
          added a comment - Also see NXP-6189 for largetext on string arrays.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment