On 31/07/2011 19:39, Wolfgang Laun wrote:
2011/7/31 Mark Proctor <mproc...@codehaus.org <mailto:mproc...@codehaus.org>>



    Implicit mapping I call Managed Object Graphs MOGs. So you can write
    Person( address.street == "my road" )

    And that internally would get translated too
    $p : Person()
    Address( person == $p, street == "my road" )

    As there is no doubt that the current explicit bindings approach
    on objects is too verbose and hard to read. Nested accessors add a
    lot of readability.


So what if Address is not an inserted fact? So far, a CE with type Foo(...) implied the existence of a fact of that type. I'm not sure that inserting some object should imply the insertion of all of its descendants as facts as well...
You don't necessarily have to insert Address. It can attach a listener, assuming the pojo supported it, when it's accessed in a pattern - allowing the pattern to receive updates from nested objects.

Whether something is inserted or not can be annotation driven. Something can't be inserted anyway unless it has the necessary references for the joins.

I want to look at a full range of MOGs to automate and semi-autimate things with regards to nested structures. At the moment there is no best practice and DRL (or any other rule language) does not make this nice. We ALL suck for compact nested accessors.

Mark

-W


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to