This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Assuming you decorate the EntityCollection field with an OrderByAttribute where needed, how do you construct the string parameter when the attribute you want to order by is actually owned by a ValueObject on the collection element? I've tried using the database column name and also using "." (dot) syntax (ie CollectionElementPropertyName.ValueObjectPropertyName and recieve errors on both accounts.
|
|
|
This isn't possible at the moment. If the target entity has only one property of the value object type (e.g. only one Address) then you can get the effect you want by specifying the name of the property on the value object type, without any qualifier: public class Address { public class Person { [OrderBy("HouseNumber")] // SQL will be ORDER BY Person.HomeAddressHouseNumber However if the Person had two Addresses then you would not be able to control which one you got. Let us know whether you are able to use this workaround for the time being. |
|
|
Ivan, Thanks, I'm definately in the two addresses category. Fortunately the list is small enough such that we can sort on the client for now. It would be a nice to have feature in the future though. |
|