You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Harald Wellmann (JIRA)" <ji...@apache.org> on 2015/07/27 19:14:05 UTC
[jira] [Comment Edited] (DELTASPIKE-965) EntityRepository.save() is
broken for entities with String ID
[ https://issues.apache.org/jira/browse/DELTASPIKE-965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14643051#comment-14643051 ]
Harald Wellmann edited comment on DELTASPIKE-965 at 7/27/15 5:13 PM:
---------------------------------------------------------------------
Pull request #40 contains a test to reproduce the problem, and a possible fix.
I haven't checked the discussion on the mailing list yet, but I noticed that all tests pass even when I comment out the countCheck(). So either it is unnecessary, or it does indeed fix a problem which is not yet covered by any tests.
Can you add a test for the original problem you were trying to fix in 1.4.2 that shows why this countCheck() really is necessary? Looking at the source code only, it doesn't really make sense to me - an existence check should be sufficient, an exact count may be more expensive, and I don't even see why the existence check would be required.
was (Author: hwellmann):
Pull request #40 contains a test to reproduce the problem and a possible fix is.
I haven't checked the discussion on the mailing list yet, but I noticed that all tests pass even when I comment out the countCheck(). So either it is unnecessary, or it does indeed fix a problem which is not yet covered by any tests.
Can you add a test for the original problem you were trying to fix in 1.4.2 that shows why this countCheck() really is necessary? Looking at the source code only, it doesn't really make sense to me - an existence check should be sufficient, an exact count may be more expensive, and I don't even see why the existence check would be required.
> EntityRepository.save() is broken for entities with String ID
> -------------------------------------------------------------
>
> Key: DELTASPIKE-965
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-965
> Project: DeltaSpike
> Issue Type: Bug
> Components: Data-Module
> Affects Versions: 1.4.2
> Reporter: Harald Wellmann
> Assignee: Daniel Cunha (soro)
> Priority: Blocker
> Fix For: 1.4.3
>
>
> EntityRepository.save() generates illegal SQL when the entity identity is of String type.
> This is a regression introduced in 1.4.2 with {{org.apache.deltaspike.data.impl.handler.CdiQueryInvocationContext.countCheck(Object)}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)