You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "srikrishnaprasad (JIRA)" <ji...@apache.org> on 2011/06/08 07:48:59 UTC
[jira] [Created] (CAY-1579) Should warn on data type mismatch for
PRIMARY KEY and FOREIGN KEY
Should warn on data type mismatch for PRIMARY KEY and FOREIGN KEY
-------------------------------------------------------------------
Key: CAY-1579
URL: https://issues.apache.org/jira/browse/CAY-1579
Project: Cayenne
Issue Type: Bug
Components: Modeler
Affects Versions: 3.0.1
Reporter: srikrishnaprasad
1.create an dbentity "oneentity" with a primary key attribute "id" of datatype "integer".
2.create an dbentity "twoentity" with a foreign key attribute "one_id" of any datatype.
3.create a relationship between oneentity and twoentity using joins source as "id" and target as "one_id".
4.press done it should raise error that data type mismatch but it is not raising any error.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAY-1579) Should warn on data type mismatch for
PRIMARY KEY and FOREIGN KEY
Posted by "srikrishnaprasad (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045890#comment-13045890 ]
srikrishnaprasad commented on CAY-1579:
---------------------------------------
class name "ResolveDbRelationshipDialog.java" method name:---private void save()-----
.......(continue)
DbJoinTableModel model = (DbJoinTableModel) table.getModel();
//code
DbJoin join = (DbJoin) model.getObjectList().get(0);
for (DbAttribute dbs : model.source.getAttributes()) {
if (dbs.getName().equals(join.getSourceName())) {
for (DbAttribute dbt : model.target.getAttributes()) {
if (dbt.getName().equals(join.getTargetName())) {
if (dbs.getType() != dbt.getType()) {
JOptionPane.showMessageDialog(this, "datatype miss match ");
return;
}
}
}
}
}
> Should warn on data type mismatch for PRIMARY KEY and FOREIGN KEY
> -------------------------------------------------------------------
>
> Key: CAY-1579
> URL: https://issues.apache.org/jira/browse/CAY-1579
> Project: Cayenne
> Issue Type: Bug
> Components: Modeler
> Affects Versions: 3.0.1
> Reporter: srikrishnaprasad
>
> 1.create an dbentity "oneentity" with a primary key attribute "id" of datatype "integer".
> 2.create an dbentity "twoentity" with a foreign key attribute "one_id" of any datatype.
> 3.create a relationship between oneentity and twoentity using joins source as "id" and target as "one_id".
> 4.press done it should raise error that data type mismatch but it is not raising any error.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira