nextras / orm

Orm with clean object design, smart relationship loading and powerful collections.
https://nextras.org/orm
MIT License
310 stars 57 forks source link

QueryBuilderHelper doesn't treat one has one (directed) relation properly #98

Closed MartinLojda closed 9 years ago

MartinLojda commented 9 years ago

in normalizeAndAddJoins method - if branch for "one has one" relation is missing.

hrach commented 9 years ago

There is an else branch, which should work correctly, but probably it isn't. https://github.com/nextras/orm/blob/a03eaaf00374f8c3452699f6a78dfdb96b63f40e/src/Mapper/Dbal/QueryBuilderHelper.php#L139-L142

hrach commented 9 years ago

I was unable to reproduce query builder failure, although, there is quite big bug in recursive persistance. I added note do doc for v1.1. v1.2 will fix it.

hrach commented 9 years ago

Oh, I see, the issue has the important part in the title. You are talking about directed relationship (1:1d) :| I was talking about 1:1.

MartinLojda commented 9 years ago

Yes, I ment directed relationship and forgot to mention it in the message. Sorry for the confusion.

hrach commented 9 years ago

@MartinLojda Could you please try the current master? It should be fixed! Thanks for reporting!