[jira] [Commented] (IGNITE-3799) More descriptive exception for Cassandra column names duplicates

2016-09-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15497103#comment-15497103
 ] 

ASF GitHub Bot commented on IGNITE-3799:


GitHub user irudyak opened a pull request:

https://github.com/apache/ignite/pull/1080

IGNITE-3799 More descriptive exception for Cassandra column names 
duplicates 



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/irudyak/ignite ignite-3799

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/ignite/pull/1080.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1080


commit 075d6c48161b0c2027bbf05864eeaeda76ea5f84
Author: Igor 
Date:   2016-09-16T04:45:53Z

As far as DataSource now implements Serializable we can remove "transient" 
modificator for "dataSrc" variable

commit ba05cb58c5fe24be750bee89dc3cf729f6ef12fd
Author: Igor 
Date:   2016-09-16T05:02:14Z

Added support for:

 1) "alias" fields - POJO fields sharing the same Cassandra table column, 
but just having different names in POJO object
 2) calculated fields - read only POJO fields which values calculated based 
on other field values. Such fields should be only written to Cassandra, but it 
doesn't make sense to read them back on load operation

commit 2becf4590721f09a2f1ef7683fe3f115a9d2a377
Author: Igor 
Date:   2016-09-16T18:43:48Z

bugfix

commit 47558f14e9d9feba3b1d0870681e098a596e87e9
Author: Igor 
Date:   2016-09-16T18:44:28Z

unit tests modified according to new POJO fields aliases concept

commit 141f1ec1daa67de82eaf138666c2d355c509611c
Author: Igor 
Date:   2016-09-16T18:52:02Z

Merge branch 'master' into ignite-3799




> More descriptive exception for Cassandra column names duplicates 
> -
>
> Key: IGNITE-3799
> URL: https://issues.apache.org/jira/browse/IGNITE-3799
> Project: Ignite
>  Issue Type: Bug
>Reporter: Igor Rudyak
>Assignee: Igor Rudyak
>
> If POJO persistence strategy is used and cache key is mapped to the same 
> column as one of the POJO fields, it's better to re-throw more descriptive 
> exception instead of 
> *com.datastax.driver.core.exceptions.InvalidQueryException: The column names 
> contains duplicates*



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (IGNITE-3799) More descriptive exception for Cassandra column names duplicates

2016-09-16 Thread Igor Rudyak (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15497061#comment-15497061
 ] 

Igor Rudyak commented on IGNITE-3799:
-

Instead of throwing exceptions it's better to have POJO fields aliases concept 
- two or more POJO fields could be mapped to the same Cassandra column if they 
have the same type.

It's rather important case when working with POJO objects in Ignite through 
JDBC. Key object and value object in Ignite cache could share the same fields 
in this case. For example we can use "long" as a key and custom "Person" class 
as a value, which at the same time already has "id" field storing the same 
"long" value (person id).

> More descriptive exception for Cassandra column names duplicates 
> -
>
> Key: IGNITE-3799
> URL: https://issues.apache.org/jira/browse/IGNITE-3799
> Project: Ignite
>  Issue Type: Bug
>Reporter: Igor Rudyak
>Assignee: Igor Rudyak
>
> If POJO persistence strategy is used and cache key is mapped to the same 
> column as one of the POJO fields, it's better to re-throw more descriptive 
> exception instead of 
> *com.datastax.driver.core.exceptions.InvalidQueryException: The column names 
> contains duplicates*



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)