I think a good feature in the ModelCriteria class is a public function exist($con = null) which returns a boolean.
Underwater it should do an EXIST SELECT .... which also returns true or false. Then, someone does not have to check if find() returns an empty collection or count() returns zero.
Maybe this is also good for performance?
@Meijuh wanna ship it?
@willdurand I am quite new to git. Do you mean I implement this in ModelCriteria, write tests and then do a pull request?
Yes! It would be wonderful
Okey, I think I have some time this week to implement this. I think you have to assign me to this issue?
I haven't implemented this yet, but I would not mind implementing it this week. Is it okey if I do a pull request before end of the week?
By the way I think the method should be named isEmpty(), exists(), or hasResults(), to match the naming scheme used for other ModelCriteria methods.
Is EXIST available on all database vendors?
I think this will cost me too much time to implement as I have to dig deep into Propel. Can anyone else implement this?
Can you tell me if EXIST is cross vendors?
@Meijuh See: #438, please try.
Add new termination method: exists()
Issue URL: #427.