[ 
https://issues.apache.org/jira/browse/CAY-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrus Adamchik updated CAY-2962:
---------------------------------
    Description: 
PostgreSQL "text" is an unconstrained VARCHAR. Cayenne doesn't like it very 
much. Reverse engineering sets the max length to 2147483647, and the absence of 
max length causes validation warning.

1. Let's handle this specific case on PostgreSQL by setting max length to -1 
(unknown)
2. No longer warn about VARCHAR without max length
3. When generating DDL SQL for PG use "text" type for an unconstrained VARCHAR
4. When generating DDL SQL for MySQL use "longtext" type for an unconstrained 
VARCHAR
5. For other databases, come up with a per-DB default length number supported 
by their VARCHAR analog

  was:
PostgreSQL "text" is an unconstrained VARCHAR. Cayenne doesn't like it very 
much. Reverse engineering sets the max length to 2147483647, and the absence of 
max length causes validation warning.

1. Let's handle this specific case on PostgreSQL by setting max length to -1 
(unknown)
2. No longer warn about VARCHAR without max length
3. When generating DDL SQL for PG use "text" type for an unconstrained VARCHAR
4. When generating DDL SQL for MySQL use "longtext" type for an unconstrained 
VARCHAR
3. For other databases, come up with a per-DB default length number supported 
by their VARCHAR analog


> Allow unconstrained VARCHAR
> ---------------------------
>
>                 Key: CAY-2962
>                 URL: https://issues.apache.org/jira/browse/CAY-2962
>             Project: Cayenne
>          Issue Type: Task
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Minor
>             Fix For: 5.0-M3
>
>
> PostgreSQL "text" is an unconstrained VARCHAR. Cayenne doesn't like it very 
> much. Reverse engineering sets the max length to 2147483647, and the absence 
> of max length causes validation warning.
> 1. Let's handle this specific case on PostgreSQL by setting max length to -1 
> (unknown)
> 2. No longer warn about VARCHAR without max length
> 3. When generating DDL SQL for PG use "text" type for an unconstrained VARCHAR
> 4. When generating DDL SQL for MySQL use "longtext" type for an unconstrained 
> VARCHAR
> 5. For other databases, come up with a per-DB default length number supported 
> by their VARCHAR analog



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to