(Reference == Reference) should be compilable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
New
|
Undecided
|
Unassigned |
Bug Description
So this is rather odd, but after some discussions with various people, I think it best to file a bug.
I have an And() parameter similar to the one below:
And(
)
The basic idea is that I can connect Ravers and the Bouncers they might come in contact with, where a Bouncer could work for many different BouncerCompany entries.
This code will raise
TypeError: Expected int, found <class 'storm.
Working code is:
And(
)
I would think that regardless of whether it fetched the foreign object in each case, the comparison would work fine in the first instance, but it doesn't.
Please for to implement this feature.
I'd guess that "Club.bouncer == BouncerCompany. teamID" works fine too. The problem is that the Reference.__eq__() method doesn't cover "Reference == Reference".
We should be able to support that case when the remote key of both relations is the same (in which case we can just compare the local keys of the two relations).