Cayenne forces DISTINCT in the generated SQL whether you specify it or not
because it detects a match on to-many relationship and realizes that it needs
to get rid of duplicates in the cartesian product. So I guess explicit DISTINCT
shouldn’t normally be needed.
As to why NULL is bound in the D
On 13/11/2013 3:59am, Ramiro Aparicio wrote:
> I am really not sure if current behaviour without distinct is ok, but at
> least it works for me.
Cayenne returns a collection of objects that will never have duplicates. In
fact you can choose whether the results return as a Set, List or Map.
Ari
I found some strange behaviour trying to use Distinct for the first time.
I have the following mapping
User is related with User via a mapping table named Contact, the PK is
an id as the User can contact the same target several times.
I wanted to get all distinct Users contacted by A, so as I w
Hi Andres,
First you will need to map a relationship based on your FK/PK pair (both
DbRelationship and ObjRelationship) [1]. Once you have that in the model and
regenerate your java classes, your Ordencompra object will have a method like
‘getCotizacions’, returning a collection of related obje