You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Andy Jefferson (JIRA)" <ji...@apache.org> on 2010/06/10 08:36:13 UTC

[jira] Created: (JDO-660) Ability to specify positioning of field 'column(s)' in datastore "table"

Ability to specify positioning of field 'column(s)' in datastore "table"
------------------------------------------------------------------------

                 Key: JDO-660
                 URL: https://issues.apache.org/jira/browse/JDO-660
             Project: JDO
          Issue Type: New Feature
          Components: api, specification, tck
            Reporter: Andy Jefferson


With an RDBMS datastore, when generating the schema, it is desirable to be able to specify the positioning of the column(s) of a field in the generated table. 
With spreadsheet documents, it is critical to be able to define which column number is used for a particular field.
With other datastores it is also likely desirable.

To achieve this I propose adding an attribute to the XML <column> called "position". Similarly for the @Column annotation.
This can take integer values with 0-origin.

Complications : 
1. how this is handled when we have inheritance. If a root class has subclass-table inheritance, then those fields are persisted into the tables of all subclasses, and we may want to override the positions for those individually - to that end the user can override the metadata of the superclass fields. 
2. anything else ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-660) Ability to specify positioning of field 'column(s)' in datastore "table"

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923494#action_12923494 ] 

Andy Jefferson commented on JDO-660:
------------------------------------

Patch applied, along with updated javax.jdo.metadata.Column to match the DTD/XSD/annotation.

> Ability to specify positioning of field 'column(s)' in datastore "table"
> ------------------------------------------------------------------------
>
>                 Key: JDO-660
>                 URL: https://issues.apache.org/jira/browse/JDO-660
>             Project: JDO
>          Issue Type: New Feature
>          Components: api, specification, tck
>            Reporter: Andy Jefferson
>             Fix For: JDO 3 maintenance release 1
>
>         Attachments: column_position.patch
>
>
> With an RDBMS datastore, when generating the schema, it is desirable to be able to specify the positioning of the column(s) of a field in the generated table. 
> With spreadsheet documents, it is critical to be able to define which column number is used for a particular field.
> With other datastores it is also likely desirable.
> To achieve this I propose adding an attribute to the XML <column> called "position". Similarly for the @Column annotation.
> This can take integer values with 0-origin.
> Complications : 
> 1. how this is handled when we have inheritance. If a root class has subclass-table inheritance, then those fields are persisted into the tables of all subclasses, and we may want to override the positions for those individually - to that end the user can override the metadata of the superclass fields. 
> 2. anything else ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JDO-660) Ability to specify positioning of field 'column(s)' in datastore "table"

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Jefferson updated JDO-660:
-------------------------------

    Attachment:     (was: JDO-660.patch)

> Ability to specify positioning of field 'column(s)' in datastore "table"
> ------------------------------------------------------------------------
>
>                 Key: JDO-660
>                 URL: https://issues.apache.org/jira/browse/JDO-660
>             Project: JDO
>          Issue Type: New Feature
>          Components: api, specification, tck
>            Reporter: Andy Jefferson
>             Fix For: JDO 3 maintenance release 1
>
>         Attachments: column_position.patch
>
>
> With an RDBMS datastore, when generating the schema, it is desirable to be able to specify the positioning of the column(s) of a field in the generated table. 
> With spreadsheet documents, it is critical to be able to define which column number is used for a particular field.
> With other datastores it is also likely desirable.
> To achieve this I propose adding an attribute to the XML <column> called "position". Similarly for the @Column annotation.
> This can take integer values with 0-origin.
> Complications : 
> 1. how this is handled when we have inheritance. If a root class has subclass-table inheritance, then those fields are persisted into the tables of all subclasses, and we may want to override the positions for those individually - to that end the user can override the metadata of the superclass fields. 
> 2. anything else ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (JDO-660) Ability to specify positioning of field 'column(s)' in datastore "table"

Posted by "Michael Bouschen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Bouschen reassigned JDO-660:
------------------------------------

    Assignee: Craig L Russell

The specification need to be updated.

> Ability to specify positioning of field 'column(s)' in datastore "table"
> ------------------------------------------------------------------------
>
>                 Key: JDO-660
>                 URL: https://issues.apache.org/jira/browse/JDO-660
>             Project: JDO
>          Issue Type: New Feature
>          Components: api, specification, tck
>            Reporter: Andy Jefferson
>            Assignee: Craig L Russell
>             Fix For: JDO 3 maintenance release 1
>
>         Attachments: column_position.patch
>
>
> With an RDBMS datastore, when generating the schema, it is desirable to be able to specify the positioning of the column(s) of a field in the generated table. 
> With spreadsheet documents, it is critical to be able to define which column number is used for a particular field.
> With other datastores it is also likely desirable.
> To achieve this I propose adding an attribute to the XML <column> called "position". Similarly for the @Column annotation.
> This can take integer values with 0-origin.
> Complications : 
> 1. how this is handled when we have inheritance. If a root class has subclass-table inheritance, then those fields are persisted into the tables of all subclasses, and we may want to override the positions for those individually - to that end the user can override the metadata of the superclass fields. 
> 2. anything else ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-660) Ability to specify positioning of field 'column(s)' in datastore "table"

Posted by "Craig L Russell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915439#action_12915439 ] 

Craig L Russell commented on JDO-660:
-------------------------------------

Assuming that we don't require that the numbers be contiguous, users could handle subclasses by allowing space between column numbers in the superclass and filling the spaces in subclasses.

When processing table creation, all classes mapped to the table would have their column numbers considered together. We can require that duplicate numbers either throw an exception or that the duplicates get resolved by treating all columns with the same column number equally, and the columns appear in some non-deterministic place "together" in the schema.

And we also should consider mixed case, where some columns have column numbers and some don't. Should this be an error, or just pile the non-numbered columns at the end?

> Ability to specify positioning of field 'column(s)' in datastore "table"
> ------------------------------------------------------------------------
>
>                 Key: JDO-660
>                 URL: https://issues.apache.org/jira/browse/JDO-660
>             Project: JDO
>          Issue Type: New Feature
>          Components: api, specification, tck
>            Reporter: Andy Jefferson
>             Fix For: JDO 3 maintenance release 1
>
>         Attachments: JDO-660.patch
>
>
> With an RDBMS datastore, when generating the schema, it is desirable to be able to specify the positioning of the column(s) of a field in the generated table. 
> With spreadsheet documents, it is critical to be able to define which column number is used for a particular field.
> With other datastores it is also likely desirable.
> To achieve this I propose adding an attribute to the XML <column> called "position". Similarly for the @Column annotation.
> This can take integer values with 0-origin.
> Complications : 
> 1. how this is handled when we have inheritance. If a root class has subclass-table inheritance, then those fields are persisted into the tables of all subclasses, and we may want to override the positions for those individually - to that end the user can override the metadata of the superclass fields. 
> 2. anything else ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-660) Ability to specify positioning of field 'column(s)' in datastore "table"

Posted by "Craig L Russell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916940#action_12916940 ] 

Craig L Russell commented on JDO-660:
-------------------------------------

With regard to the patch, perhaps we should just create the 3.1 dtd and xsd files separately and then provide changes in this patch.


> Ability to specify positioning of field 'column(s)' in datastore "table"
> ------------------------------------------------------------------------
>
>                 Key: JDO-660
>                 URL: https://issues.apache.org/jira/browse/JDO-660
>             Project: JDO
>          Issue Type: New Feature
>          Components: api, specification, tck
>            Reporter: Andy Jefferson
>             Fix For: JDO 3 maintenance release 1
>
>         Attachments: JDO-660.patch
>
>
> With an RDBMS datastore, when generating the schema, it is desirable to be able to specify the positioning of the column(s) of a field in the generated table. 
> With spreadsheet documents, it is critical to be able to define which column number is used for a particular field.
> With other datastores it is also likely desirable.
> To achieve this I propose adding an attribute to the XML <column> called "position". Similarly for the @Column annotation.
> This can take integer values with 0-origin.
> Complications : 
> 1. how this is handled when we have inheritance. If a root class has subclass-table inheritance, then those fields are persisted into the tables of all subclasses, and we may want to override the positions for those individually - to that end the user can override the metadata of the superclass fields. 
> 2. anything else ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JDO-660) Ability to specify positioning of field 'column(s)' in datastore "table"

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Jefferson updated JDO-660:
-------------------------------

    Attachment: JDO-660.patch

Please find attached a patch to add "position" attribute to @Column annotation, and to add "position" attribute to <column> XML element.

> Ability to specify positioning of field 'column(s)' in datastore "table"
> ------------------------------------------------------------------------
>
>                 Key: JDO-660
>                 URL: https://issues.apache.org/jira/browse/JDO-660
>             Project: JDO
>          Issue Type: New Feature
>          Components: api, specification, tck
>            Reporter: Andy Jefferson
>             Fix For: JDO 3 maintenance release 1
>
>         Attachments: JDO-660.patch
>
>
> With an RDBMS datastore, when generating the schema, it is desirable to be able to specify the positioning of the column(s) of a field in the generated table. 
> With spreadsheet documents, it is critical to be able to define which column number is used for a particular field.
> With other datastores it is also likely desirable.
> To achieve this I propose adding an attribute to the XML <column> called "position". Similarly for the @Column annotation.
> This can take integer values with 0-origin.
> Complications : 
> 1. how this is handled when we have inheritance. If a root class has subclass-table inheritance, then those fields are persisted into the tables of all subclasses, and we may want to override the positions for those individually - to that end the user can override the metadata of the superclass fields. 
> 2. anything else ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JDO-660) Ability to specify positioning of field 'column(s)' in datastore "table"

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Jefferson updated JDO-660:
-------------------------------

    Attachment: column_position.patch

Replacement patch relative to start-point DTD/XSD

> Ability to specify positioning of field 'column(s)' in datastore "table"
> ------------------------------------------------------------------------
>
>                 Key: JDO-660
>                 URL: https://issues.apache.org/jira/browse/JDO-660
>             Project: JDO
>          Issue Type: New Feature
>          Components: api, specification, tck
>            Reporter: Andy Jefferson
>             Fix For: JDO 3 maintenance release 1
>
>         Attachments: column_position.patch
>
>
> With an RDBMS datastore, when generating the schema, it is desirable to be able to specify the positioning of the column(s) of a field in the generated table. 
> With spreadsheet documents, it is critical to be able to define which column number is used for a particular field.
> With other datastores it is also likely desirable.
> To achieve this I propose adding an attribute to the XML <column> called "position". Similarly for the @Column annotation.
> This can take integer values with 0-origin.
> Complications : 
> 1. how this is handled when we have inheritance. If a root class has subclass-table inheritance, then those fields are persisted into the tables of all subclasses, and we may want to override the positions for those individually - to that end the user can override the metadata of the superclass fields. 
> 2. anything else ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (JDO-660) Ability to specify positioning of field 'column(s)' in datastore "table"

Posted by "Michael Bouschen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923901#action_12923901 ] 

Michael Bouschen edited comment on JDO-660 at 10/22/10 12:45 PM:
-----------------------------------------------------------------

The specification needs to be updated.

      was (Author: mbo):
    The specification need to be updated.
  
> Ability to specify positioning of field 'column(s)' in datastore "table"
> ------------------------------------------------------------------------
>
>                 Key: JDO-660
>                 URL: https://issues.apache.org/jira/browse/JDO-660
>             Project: JDO
>          Issue Type: New Feature
>          Components: api, specification, tck
>            Reporter: Andy Jefferson
>            Assignee: Craig L Russell
>             Fix For: JDO 3 maintenance release 1
>
>         Attachments: column_position.patch
>
>
> With an RDBMS datastore, when generating the schema, it is desirable to be able to specify the positioning of the column(s) of a field in the generated table. 
> With spreadsheet documents, it is critical to be able to define which column number is used for a particular field.
> With other datastores it is also likely desirable.
> To achieve this I propose adding an attribute to the XML <column> called "position". Similarly for the @Column annotation.
> This can take integer values with 0-origin.
> Complications : 
> 1. how this is handled when we have inheritance. If a root class has subclass-table inheritance, then those fields are persisted into the tables of all subclasses, and we may want to override the positions for those individually - to that end the user can override the metadata of the superclass fields. 
> 2. anything else ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.