2016-08-26 11 views
0

私はjHipsterでモデルを再生成しようとすると、私は次のエラーを取得:私は「何の検証「[オブジェクトのオブジェクト]が」タイプではサポートされていない「文字列」

The validation '[object Object]' isn't supported for the type 'String'.

任意の考えを間違ってる?

私が使用しているjHipsterのバージョンは3.6.1です。

{ 

    /** 
    * Hierarchy entity. 
    * @author Shane Hayes. 
    */ 
    entity HierarchyServiceCenter { 
     hrchyNode1IPId Integer required, 
     hrchyNode1IPNm String maxlength(40), 
     hrchyNode1Dsgntn String, 
     hrchyNode2IPId Integer , 
     hrchyNode2IPNm String maxlength(40), 
     hrchyNode2Dsgntn String, 
     hrchyNode3IPId Integer , 
     hrchyNode3IPNm String maxlength(40), 
     hrchyNode3Dsgntn String, 
     hrchyLeafCode Integer required, 
     hrchyLeafIPNm String maxlength(40) required, 
     hrchyLeafDsgntn String , 
     hrchyLeafLctnGNm String, 
     hrchySource String, 
     hrchyTimeStampCreate ZonedDateTime required, 
     hrchyTimeStampUpdate ZonedDateTime , 
    } 
    /** 
    * TimeDimention entity. 
    * @author Shane Hayes. 
    */ 
    entity TimeDimension { 
     createDate ZonedDateTime required, 
     updateDate ZonedDateTime 
    } 
    /** 
    * MetricDimention entity. 
    * @author Shane Hayes. 
    */ 
    entity MetricDimension { 
     metricDimKey String required max(10), 
     metricName String max(35), 
     asOfDate ZonedDateTime, 
     metricFrequency String max(1), 
     srcSystemID Integer, 
     createTmStamp ZonedDateTime, 
     updateTmStamp ZonedDateTime 
    } 
    /** 
    * MetricTarget entity. 
    * @author Shane Hayes. 
    */ 
    entity MetricTarget { 
     goalAmt BigDecimal required, 
     autoComputed Integer, 
     asOfDate ZonedDateTime required, 
     goalEffDate ZonedDateTime required, 
     endDate ZonedDateTime required, 
     srcSystemID Integer, 
     createDate ZonedDateTime, 
     updateDate ZonedDateTime 
    } 
    relationship ManyToOne { 
     MetricTarget{metricDimension} to MetricDimension, 
     MetricTarget{hierarchyLeafCode} to HierarchyServiceCenter{hrchyLeafCode}, 
     MetricTarget{hierarchyNode1IPId} to HierarchyServiceCenter{hrchyNode1IPId}, 
     MetricTarget{hierarchyNode2IPId} to HierarchyServiceCenter{hrchyNode2IPId}, 
     MetricTarget{hierarchyNode3IPId} to HierarchyServiceCenter{hrchyNode3IPId}, 
     MetricTarget{hierarchyNode4IPId} to HierarchyServiceCenter{hrchyNode4IPId}, 
     MetricTarget{timeDimensionId} to TimeDimension 
    } 
    entity MetricActual { 
     actualAmt BigDecimal required, 
     autoComputed Integer, 
     asOfDate ZonedDateTime required, 
     goalEffDate ZonedDateTime required, 
     endDate ZonedDateTime required, 
     srcSystemID Integer, 
     createDate ZonedDateTime, 
     updateDate ZonedDateTime 
    } 
    relationship ManyToOne { 
     MetricActual{metricDimension} to MetricDimension, 
     MetricActual{hierarchyLeafCode} to HierarchyServiceCenter{hrchyLeafCode}, 
     MetricActual{hierarchyNode1IPId} to HierarchyServiceCenter{hrchyNode1IPId}, 
     MetricActual{hierarchyNode2IPId} to HierarchyServiceCenter{hrchyNode2IPId}, 
     MetricActual{hierarchyNode3IPId} to HierarchyServiceCenter{hrchyNode3IPId}, 
     MetricActual{hierarchyNode4IPId} to HierarchyServiceCenter{hrchyNode4IPId}, 
     MetricActual{timeDimensionId} to TimeDimension 
    } 

} 

答えて

1
  • 最初のエラーは、JDLの先頭と末尾の中括弧です。

  • 2番目のエラーは、max(35)要素です。代わりにmaxlength(35)と書く必要があります。

  • 第3のエラーは、MetricTargetとMetricDimensionの関係、およびMetricActualとMetricDimensionの関係です。これらは単方向関係(ManyToOne)なので、例を書く必要があります。 MetricTarget{hierarchyLeafCode} to HierarchyServiceCenter{hrchyLeafCode}の代わりにMetricTarget{hierarchyLeafCode} to HierarchyServiceCenter
+0

私はmax(35)で私のエラーを見ました。 –

0

まず、すべての中括弧を削除します。彼らはそこにいるべきではありません。 2番目はすべてJDL studioに貼り付け、構文チェックに合格していることを確認します。それは、もし存在するならば、どのラインに問題があるかを赤の上に伝えます。

関連する問題