Ate Douma created RAVE-845:
------------------------------

             Summary: Cannot delete a user which has one or more friend 
associations
                 Key: RAVE-845
                 URL: https://issues.apache.org/jira/browse/RAVE-845
             Project: Rave
          Issue Type: Bug
    Affects Versions: 0.17
            Reporter: Ate Douma
            Priority: Blocker
             Fix For: 0.18


As reported  on the dev@ list:
 
On 11/05/2012 02:20 PM, Franklin, Matthew B. wrote:
> I went through the release and everything looks good except that I can't
> seem to delete users.  I get the following exception with the demo binary
> as well as the built source:
> 
> [WARNING] [talledLocalContainer] SEVERE: Servlet.service() for servlet
> dispatcher threw exception
> [WARNING] [talledLocalContainer]
> org.apache.rave.persistence.impl.TranslatedH2Exception: Unknown Database
> Error
> [WARNING] [talledLocalContainer]      at
> org.apache.rave.persistence.jpa.impl.H2OpenJpaDialect.translateExceptionIfP
> ossible(H2OpenJpaDialect.java:60)
> [WARNING] [talledLocalContainer]      at
> org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionMa
> nager.java:516)
> [WARNING] [talledLocalContainer]      at
> org.springframework.transaction.support.AbstractPlatformTransactionManager.
> processCommit(AbstractPlatformTransactionManager.java:754)
> [WARNING] [talledLocalContainer]      at
> org.springframework.transaction.support.AbstractPlatformTransactionManager.
> commit(AbstractPlatformTransactionManager.java:723)
> 

Followed up by:

On 11/05/2012 04:47 PM, Franklin, Matthew B. wrote:
> I confirmed that I was working with a clean database and dug a little
> deeper to find that it only occurs when you are deleting a user that has
> one or more associations.  The exact exception is as follows:
> 
> Referential integrity constraint violation: "CONSTRAINT_43:
> PUBLIC.PERSON_ASSOCIATION FOREIGN KEY(FOLLOWEDBY_ID) REFERENCES
> PUBLIC.PERSON(ENTITY_ID) (3)"; SQL statement:
> DELETE FROM person WHERE entity_id = ? [23503-167] {prepstmnt 1230081703
> DELETE FROM person WHERE entity_id = ? [params=?]} [code=23503,
> state=23503]
> 

and:

On 11/05/2012 04:57 PM, Chris Geer wrote:
> Ok, this probably makes sense. Since we did the model split, I bet JPA no
> longer enforces referential integrity. We probably need to add in business
> level checks for related entities.

and: 


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to