soql icon indicating copy to clipboard operation
soql copied to clipboard

Relationships are not nullable

Open rpanman-sonatype opened this issue 2 years ago • 2 comments

Hi there

Firstly, this is a great library so thanks for putting the effort in! So now onto the issue...

There are some optional relationships in my setup where the relationship does not always exist, i.e. the relationship is valid or it has a null value. The way this soql module works at the moment it is not possible to make Relationships nullable (for example by setting nullable=True).

I've patched this on my local installation so that I can set nullable=True on relationships (basically allowing this to be set on the Relationship constructor and then passing the value along in the call to super).

I'm happy to submit a PR for this if that's intended functionality, although I haven't written a specific test for it yet :-)

rpanman-sonatype avatar Oct 24 '22 09:10 rpanman-sonatype

Nullable relationships make sense to me. A PR would be welcomed 😁

barakalon avatar Oct 24 '22 15:10 barakalon

PR submitted here: https://github.com/plangrid/soql/pull/12

rpanman-sonatype avatar Oct 25 '22 12:10 rpanman-sonatype