Hello All,

In the Stripes book there is the following code in the BaseDaoImpl class:

@SuppressWarnings("unchecked")
    public List<T> listFindBy(String fieldName, Object value) {
        Query query = Stripersist.getEntityManager()
            .createQuery(getQuery(fieldName, null))
            .setParameter(fieldName, value);
        return query.getResultList();
    }

It works all right when I try to get a property from my T class. The problem
is that I want to query a nested property from T class, e.g., T.x.y, where x
and y are classes instantiated from T. The persistence tree for these
classes works alright, but I want to create a code where I could query
nested properties from these classes.

Here is how I tried to query the nested properties from my class:


public List<Inventory> findByState(String name){
        return listFindBy("location.geo_location.state", name);
    }

Any thoughts?

cheers,
Fabio
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to