abstratt / cloudfier

Cloudfier is a model-driven tool for rapid development of business applications
http://cloudfier.com
Other
22 stars 4 forks source link

generation error if query performs casting #166

Open abstratt opened 8 years ago

abstratt commented 8 years ago

    static query minhasEmAberto() : Tarefa[*];
    begin
        return Tarefa extent.select((t : Tarefa) : Boolean {
            t.responsavel == (System#user() as Colaborador) and t.estado == Estado#EmAberto
        });
    end;
java.lang.UnsupportedOperationException: TODO: auto-generated method stub
    at com.abstratt.mdd.target.jse.AbstractJavaBehaviorGenerator.generateActivityAsExpression(AbstractJavaBehaviorGenerator.java:66)
    at com.abstratt.mdd.target.base.IBasicBehaviorGenerator.generateActivityAsExpression(IBasicBehaviorGenerator.java:26)
    at com.abstratt.mdd.target.jee.JPQLFilterActionGenerator.generateTraverseRelationshipAction(JPQLFilterActionGenerator.java:74)
    at com.abstratt.mdd.target.jse.AbstractJavaBehaviorGenerator.generateReadStructuralFeatureAction(AbstractJavaBehaviorGenerator.java:163)
    at com.abstratt.mdd.target.jse.AbstractJavaBehaviorGenerator._doGenerateAction(AbstractJavaBehaviorGenerator.java:151)
    at com.abstratt.mdd.target.jse.AbstractJavaBehaviorGenerator.doGenerateAction(AbstractJavaBehaviorGenerator.java:321)
    at com.abstratt.mdd.target.jse.AbstractJavaBehaviorGenerator.generateActionProper(AbstractJavaBehaviorGenerator.java:61)
    at com.abstratt.mdd.target.base.IBehaviorGenerator.lambda$0(IBehaviorGenerator.java:113)
    at com.abstratt.mdd.target.base.IBehaviorGenerator.runWithAction(IBehaviorGenerator.java:85)
    at com.abstratt.mdd.target.base.IBehaviorGenerator.generateAction(IBehaviorGenerator.java:117)
    at com.abstratt.mdd.target.jse.AbstractJavaBehaviorGenerator.generateAction(AbstractJavaBehaviorGenerator.java:56)
    at com.abstratt.mdd.target.base.IBasicBehaviorGenerator.generateAction(IBasicBehaviorGenerator.java:67)
    at com.abstratt.mdd.target.jee.JPQLFilterActionGenerator.generateTestIdentityAction(JPQLFilterActionGenerator.java:417)
    at com.abstratt.mdd.target.jse.AbstractJavaBehaviorGenerator._doGenerateAction(AbstractJavaBehaviorGenerator.java:184)
    at com.abstratt.mdd.target.jse.AbstractJavaBehaviorGenerator.doGenerateAction(AbstractJavaBehaviorGenerator.java:337)
    at com.abstratt.mdd.target.jse.AbstractJavaBehaviorGenerator.generateActionProper(AbstractJavaBehaviorGenerator.java:61)
    at com.abstratt.mdd.target.base.IBehaviorGenerator.lambda$0(IBehaviorGenerator.java:113)
    at com.abstratt.mdd.target.base.IBehaviorGenerator.runWithAction(IBehaviorGenerator.java:85)
    at com.abstratt.mdd.target.base.IBehaviorGenerator.generateAction(IBehaviorGenerator.java:117)
    at com.abstratt.mdd.target.jse.AbstractJavaBehaviorGenerator.generateAction(AbstractJavaBehaviorGenerator.java:56)
    at com.abstratt.mdd.target.base.IBasicBehaviorGenerator.generateAction(IBasicBehaviorGenerator.java:67)
    at com.abstratt.mdd.target.jee.JPQLFilterActionGenerator.lambda$1(JPQLFilterActionGenerator.java:306)
abstratt commented 8 years ago

Looks like it is because JPQLFilterActionGenerator does not support casting in a query condition.