[ 
https://issues.apache.org/jira/browse/RAVE-690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425824#comment-13425824
 ] 

Viknes B commented on RAVE-690:
-------------------------------

I added the @Transactional annotation and the values are getting persisted.
But strangely the values already present in the DB were getting deleted.
so i enabled the SQL logs to see wht was happening and i found out these 2 
queries were getting executed.
[INFO] [talledLocalContainer] 656517  ravePersistenceUnit  TRACE  [http-8080-8] 
openjpa.jdbc.SQL - <t 2085407535, conn 1950175420> executing prepstmnt 
510336827 DELETE FROM person_address_jn WHERE address_id = ? [params=?]
[INFO] [talledLocalContainer] 656518  ravePersistenceUnit  TRACE  [http-8080-8] 
openjpa.jdbc.SQL - <t 2085407535, conn 1950175420> executing prepstmnt 
181365271 DELETE FROM person_association WHERE follower_id = ? [params=?]
This is because of the ManyToMany mapping in the JpaPerson class to get the 
list of friends.
But this variable 'friends' is never used any where in Rave and also it 
actually does not get the list of friends.
So i removed this variable, mapping and then tested the addfriend functionality 
and it is working fine.

1. Is it ok if i remove this mapping variable?
2. I guess delete queries like the above are executed when a @JoinTable is 
present. Can anyone tell me why?
                
> Manage Friend Data in Rave
> --------------------------
>
>                 Key: RAVE-690
>                 URL: https://issues.apache.org/jira/browse/RAVE-690
>             Project: Rave
>          Issue Type: Improvement
>            Reporter: Raminderjeet Singh
>            Assignee: Viknes B
>         Attachments: addFriend_initial.patch, gadget.patch, gadget.txt
>
>
> Currently we can display friend data in rave but there are no methods to 
> add/delete friend from open social data in Rave. It would be good to have 
> friend operation in rave and display them into user profile page. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to