Hints for migration from 1.0 to 2.0

52 views
Skip to first unread message

Alex Rhomberg

unread,
Mar 18, 2013, 2:38:58 PM3/18/13
to twig-p...@googlegroups.com
I'm trying to migrate to twig 2.0-RC due to a tiny bug with 1.0.4 with GAE SDK 1.7.5.
Some hints in the Wiki for the migration would be very useful, such as:

  • Make sure you depend on guava 10.x, currently guava 11.x or later is not supported. Expection thrown is
    java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.expireAfterWrite(JLjava/util/concurrent/TimeUnit;)Lcom/google/common/collect/MapMaker; from class com.google.code.twig.standard.StandardCommonFindCommand
  • All persisted classes have to be registered using ObjectDatastoreFactory.register(Class<?> clazz). Otherwise an IllegalStateException is thrown. If you want to load the entities written with twig 1.0.4, add an @Entity(kind="old_generated_twig_name") annotation to the classes
  • Change annotation @Key to @Id

John Patterson

unread,
Mar 18, 2013, 5:14:25 PM3/18/13
to twig-p...@googlegroups.com
Thanks, I expect to have more time to dedicate to Twig soon and will update the docs.

--
You received this message because you are subscribed to the Google Groups "twig-persist" group.
To unsubscribe from this group and stop receiving emails from it, send an email to twig-persist...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alex Rhomberg

unread,
Mar 24, 2013, 6:51:13 PM3/24/13
to twig-p...@googlegroups.com
Another hint is that you have to set @Index annotation on every field that you ever want to sort or filter.

This wasn't necessary in twig 1.0, right?
Reply all
Reply to author
Forward
0 new messages