Hi!
When trying to Query.select() a property within an embedded Key (composite key), this property is missing from the list of selected columns.
The problem can be located in BeanDescriptor.findBeanProperty which is not able to find columns of embedded properties e.g. "key.customerId".
The following patch will lookup the whole property path and drill down it if possible. e.g. "key" is a BeanProperty of type BeanPropertyAssoc and thus the further lookup is delegated to the targetDescription.
Ciao,Mario
Index: ../ebean/src/com/avaje/ebean/server/deploy/BeanDescriptor.java===================================================================--- ../ebean/src/com/avaje/ebean/server/deploy/BeanDescriptor.java (revision 210)+++ ../ebean/src/com/avaje/ebean/server/deploy/BeanDescriptor.java Wed Apr 15 13:26:54 CEST 2009@@ -986,14 +985,33 @@ *
This is now fixed in HEAD.