yup, did see them on an earlier review, but misses when I applied,
Thanks for spotting, I will remove.... I should have re-read the diff
before commit, sorry.
Ian
On 11 Dec 2008, at 23:33, chico charlesworth wrote:
Apologies, i inadvertently added the System.out in the 773 patch by
mistake,
feel free to remove them.
2008/12/11 Vincent Siveton <[email protected]>
Hi Ian,
2008/12/11 <[email protected]>:
Author: ieb
Date: Wed Dec 10 21:05:43 2008
New Revision: 725581
URL: http://svn.apache.org/viewvc?rev=725581&view=rev
Log:
SHINDIG-773
Patch from Chico Charlesworth
Patch fixes three separate issues with persisting ActivityDb:
- Fixed NullPointerException by defaulting templateParamsDb
variable to
a new ConcurrentHashMap in ActivityDb.
- Fixed TransientObjectException (object references an unsaved
transient
instance - save the transient instance before flushing:
org.apache.shindig.social.opensocial.jpa.MediaItemDb) by adding
cascade =
all in @ManyToMany for mediaItems variable in ActivityDb
- Fixed IllegalArgumentException (can not set long field
org.apache.shindig.social.opensocial.jpa.ActivityDb.objectId to
java.util.ArrayList) by fixing the @ManyToOne relationship in
ActivityTemplateParamsDb.
Thanks
Modified:
incubator/shindig/trunk/java/samples/src/main/java/org/apache/
shindig/social/opensocial/jpa/ActivityDb.java
incubator/shindig/trunk/java/samples/src/main/java/org/apache/
shindig/social/opensocial/jpa/ActivityTemplateParamsDb.java
[SNIP]
@@ -557,6 +557,7 @@
*/
@PrePersist
public void populateDbFields() {
+ System.out.println("---------------- populateDbFields");
// add new entries
for (Entry<String, String> e : templateParams.entrySet()) {
ActivityTemplateParamsDb a = templateParamsDb.get(e.getKey());
@@ -564,8 +565,9 @@
a = new ActivityTemplateParamsDb();
a.name = e.getKey();
a.value = e.getValue();
- a.activities = new ArrayList<Activity>();
- a.activities.add(this);
+ a.activity = this;
+ //a.activities = new ArrayList<Activity>();
+ //a.activities.add(this);
templateParamsDb.put(e.getKey(), a);
} else {
a.value = e.getValue();
@@ -581,6 +583,7 @@
for (String r : toRemove) {
templateParamsDb.remove(r);
}
+ System.out.println("---------------- DONE populateDbFields");
}
Is System.out really useful there? Using a logging api sounds better.
Cheers,
Vincent
[SNIP]