sim51/logisima-play-yml — Issue #6: ClassCastException: [my.enum.Class] cannot be cast to play.db.jpa.JPABase
Author: Fluor
Created: 2012-01-29 21:26:14+00:00
State: open

Hi,

I've tried your module 1.6 on Play 1.2.4, and got the following stack trace while running `play yml:generate`:
```
13:13:42,475 INFO ~ Generate YML for class id :Staff_1(24fields)
Exception in thread "main" java.lang.ClassCastException: models.Badge cannot be cast to play.db.jpa.JPABase
at play.modules.yml.YmlExtractorUtil.getObjectId(YmlExtractorUtil.java:353)
at play.modules.yml.YmlExtractorUtil.object2YmlObject(YmlExtractorUtil.java:231)
at play.modules.yml.YmlExtractor.mainWork(YmlExtractor.java:87)
at play.modules.yml.YmlExtractor.main(YmlExtractor.java:71)
````

My Staff entity that your module is failing to export has [the following attribute](https://github.com/Fluor/linkit/blob/master/app/models/Member.java#L131), which is apparently the cause of this problem :
```
@ElementCollection
public Set badges = EnumSet.noneOf(Badge.class);
```

Thanks for you help, and let me know if I can be of any more help.