I have a problem in my DQL query. I have a table which has 3 foreign keys userId, userRId and userAId. Two of those foreign keys may be NULL.
I want to join all the foreign keys in the query but i don't know how to join two or three foreign keys between the same tables. (see query ) Could somebody give me some ideas??
**TABLE A**
id userId userRId userAId
1 2 NULL NULL
1 2 1 NULL
1 2 NULL 1
**TABLE USER**
userId name
2 xxxx
1 xxxx
The DQL query:
"SELECT FROM nasyBundle:A a JOIN a.userId u , a JOIN userRId , a JOIN userAid
WHERE ...