You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Rares Ispas (JIRA)" <de...@cayenne.apache.org> on 2008/02/29 14:11:16 UTC

[jira] Created: (CAY-992) Modeler does not escape entity names

Modeler does not escape entity names
------------------------------------

                 Key: CAY-992
                 URL: https://issues.apache.org/cayenne/browse/CAY-992
             Project: Cayenne
          Issue Type: Bug
          Components: CayenneModeler GUI
    Affects Versions: 1.2 [STABLE], 2.0 [STABLE], 3.0
         Environment: Postgres SQL
            Reporter: Rares Ispas
            Assignee: Andrus Adamchik


Postgres SQL requires using commas for case sensitive object names.
When such a table or column name contains commas, the Modeler saves them unescaped in the .xml file.

For example:
	<db-entity name=""Users"" schema="...">

The result is that the xml file is unreadable.

Using &quot; is also not an option, since the second time the schema xml is read, it will be saved again as " instead of &quot;

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


[jira] Commented: (CAY-992) Modeler does not escape entity names

Posted by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org>.
    [ https://issues.apache.org/cayenne/browse/CAY-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761#action_12761 ] 

Andrus Adamchik commented on CAY-992:
-------------------------------------

That helped. Here is a line causing failure:

<db-relationship name="toBookmarks" source=""bk_calls"" target="bookmarks" toMany="false">

Will fix it shortly.

> Modeler does not escape entity names
> ------------------------------------
>
>                 Key: CAY-992
>                 URL: https://issues.apache.org/cayenne/browse/CAY-992
>             Project: Cayenne
>          Issue Type: Bug
>          Components: CayenneModeler GUI
>    Affects Versions: 1.2 [STABLE], 2.0 [STABLE], 3.0
>         Environment: Postgres SQL
>            Reporter: Rares Ispas
>            Assignee: Andrus Adamchik
>         Attachments: DataMapError.zip
>
>
> Postgres SQL requires using commas for case sensitive object names.
> When such a table or column name contains commas, the Modeler saves them unescaped in the .xml file.
> For example:
> 	<db-entity name=""Users"" schema="...">
> The result is that the xml file is unreadable.
> Using &quot; is also not an option, since the second time the schema xml is read, it will be saved again as " instead of &quot;

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


[jira] Commented: (CAY-992) Modeler does not escape entity names

Posted by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org>.
    [ https://issues.apache.org/cayenne/browse/CAY-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12755#action_12755 ] 

Andrus Adamchik commented on CAY-992:
-------------------------------------

Hmm... this works just fine for me... E.g. here is a DataMap saved from 2.0 Modeler:

<?xml version="1.0" encoding="utf-8"?>
<data-map project-version="2.0">
	<db-entity name="&quot;x&quot;">
		<db-attribute name="&quot;yy&quot;"/>
		<db-attribute name="&apos;xx&apos;"/>
	</db-entity>
	<db-entity name="&apos;y&apos;">
	</db-entity>
	<obj-entity name="_x_" dbEntityName="&quot;x&quot;">
		<obj-attribute name="_xx_" db-attribute-path="&apos;xx&apos;"/>
		<obj-attribute name="_yy_" db-attribute-path="&quot;yy&quot;"/>
	</obj-entity>
	<obj-entity name="_y_" dbEntityName="&apos;y&apos;">
	</obj-entity>
</data-map>


Could you please attach the DataMap file that is causing trouble? Maybe some other XML attributes are not encoded properly. But db-entity name and db-attribute name are most certainly encoded correctly.

> Modeler does not escape entity names
> ------------------------------------
>
>                 Key: CAY-992
>                 URL: https://issues.apache.org/cayenne/browse/CAY-992
>             Project: Cayenne
>          Issue Type: Bug
>          Components: CayenneModeler GUI
>    Affects Versions: 1.2 [STABLE], 2.0 [STABLE], 3.0
>         Environment: Postgres SQL
>            Reporter: Rares Ispas
>            Assignee: Andrus Adamchik
>
> Postgres SQL requires using commas for case sensitive object names.
> When such a table or column name contains commas, the Modeler saves them unescaped in the .xml file.
> For example:
> 	<db-entity name=""Users"" schema="...">
> The result is that the xml file is unreadable.
> Using &quot; is also not an option, since the second time the schema xml is read, it will be saved again as " instead of &quot;

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


[jira] Commented: (CAY-992) Modeler does not escape entity names

Posted by "Rares Ispas (JIRA)" <de...@cayenne.apache.org>.
    [ https://issues.apache.org/cayenne/browse/CAY-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12757#action_12757 ] 

Rares Ispas commented on CAY-992:
---------------------------------

Sorry, I tested on 3.0 M2 and M3 and assumed it applies to older versions too. It works for me too on 2.0, but not on 3.0.

> Modeler does not escape entity names
> ------------------------------------
>
>                 Key: CAY-992
>                 URL: https://issues.apache.org/cayenne/browse/CAY-992
>             Project: Cayenne
>          Issue Type: Bug
>          Components: CayenneModeler GUI
>    Affects Versions: 1.2 [STABLE], 2.0 [STABLE], 3.0
>         Environment: Postgres SQL
>            Reporter: Rares Ispas
>            Assignee: Andrus Adamchik
>
> Postgres SQL requires using commas for case sensitive object names.
> When such a table or column name contains commas, the Modeler saves them unescaped in the .xml file.
> For example:
> 	<db-entity name=""Users"" schema="...">
> The result is that the xml file is unreadable.
> Using &quot; is also not an option, since the second time the schema xml is read, it will be saved again as " instead of &quot;

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


[jira] Commented: (CAY-992) Modeler does not escape entity names

Posted by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org>.
    [ https://issues.apache.org/cayenne/browse/CAY-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758#action_12758 ] 

Andrus Adamchik commented on CAY-992:
-------------------------------------

It works for me on M3 just as well. So a sample DataMap is still appreciated.

> Modeler does not escape entity names
> ------------------------------------
>
>                 Key: CAY-992
>                 URL: https://issues.apache.org/cayenne/browse/CAY-992
>             Project: Cayenne
>          Issue Type: Bug
>          Components: CayenneModeler GUI
>    Affects Versions: 1.2 [STABLE], 2.0 [STABLE], 3.0
>         Environment: Postgres SQL
>            Reporter: Rares Ispas
>            Assignee: Andrus Adamchik
>
> Postgres SQL requires using commas for case sensitive object names.
> When such a table or column name contains commas, the Modeler saves them unescaped in the .xml file.
> For example:
> 	<db-entity name=""Users"" schema="...">
> The result is that the xml file is unreadable.
> Using &quot; is also not an option, since the second time the schema xml is read, it will be saved again as " instead of &quot;

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


[jira] Closed: (CAY-992) Modeler does not escape entity names

Posted by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org>.
     [ https://issues.apache.org/cayenne/browse/CAY-992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-992.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0

> Modeler does not escape entity names
> ------------------------------------
>
>                 Key: CAY-992
>                 URL: https://issues.apache.org/cayenne/browse/CAY-992
>             Project: Cayenne
>          Issue Type: Bug
>          Components: CayenneModeler GUI
>    Affects Versions: 1.2 [STABLE], 2.0 [STABLE], 3.0
>         Environment: Postgres SQL
>            Reporter: Rares Ispas
>            Assignee: Andrus Adamchik
>             Fix For: 3.0
>
>         Attachments: DataMapError.zip
>
>
> Postgres SQL requires using commas for case sensitive object names.
> When such a table or column name contains commas, the Modeler saves them unescaped in the .xml file.
> For example:
> 	<db-entity name=""Users"" schema="...">
> The result is that the xml file is unreadable.
> Using &quot; is also not an option, since the second time the schema xml is read, it will be saved again as " instead of &quot;

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