Use Map as property of model in Play

前端 未结 3 1065
日久生厌
日久生厌 2021-02-04 17:33

I\'m trying to use a Map as a type for one of my models properties. Let\'s take these two classes for example:

@Entity
public class Foo extends Model {

    @One         


        
3条回答
  •  不要未来只要你来
    2021-02-04 18:19

    I tryed your code today and it worked without problems. Which play version do you use? I use 1.2.3.

    Maybe the plugin association solves that problem, because that is what I'm using in background. Please let me know if an upgrade helped you.

    Follows standard play module installation procedure:

    play install associations
    

    Add the following line to your dependencies.yml replacing 1.0 with desired version:

    require:
        - play -> associations 1.0
    

提交回复
热议问题