ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Malin <nicolas.ma...@nereide.fr>
Subject Re: Suggest to improve groovy DSL -> entity-one
Date Sat, 01 Jul 2017 19:57:08 GMT
Hi Jacopo,

I was sure that this thread will pick your interest  ;)

I separate the thread for each suggest

in line

Le 01/07/2017 à 10:59, Jacopo Cappellato a écrit :
> Hi Nicolas,
> [...]
> entity-one : with the minilang is really usefull to call directly a entity
> like that
>      <entity-one entity-name="Product" value-name="product"/>
> currently with groovy
>      GenericValue product = from("Product").where([productId:
> productId).findOne()
> We could probably make the existing EntityQuery.where(Map) method more
> clever and automatically exclude fields that are not in the entity
> definition; after that we could use:
>
> GenericValue product = from("Product").where(groovyCtx).findOne()
Yeah it's a good idea to keep the same syntax with the EntityQuery but 
you are not afraid to slow down the global function ?
I will test it to ensure this is a good way ... or not.

Nicolas

Mime
View raw message