Paweł Niedzielski
Paweł Niedzielski
@Hast constructors are not called by Doctrine initializer as far as I know, unless something changed recently. Reason being this allows you to have your own constructors with enforced data,...
> But I believe such thing was possible due to all builders in 1.x being inherited from doctrine/mongodb which was dealing with plain collections. Yes, that's the case actually. Since...
> do you want to cook up some test cases or even give the implementation a shot? Yes, I'll try to work it out this week.
I like the stale bot though. It exists as a constant reminder of my failure to deliver promises and things I forgot about :smiley_cat:
@malarzm so basically an additional check should be added around here: https://github.com/doctrine/mongodb-odm/blob/011c4652542fc82b095b5d620a5b225e6aad799a/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php#L1925-L1936 Simply looking if `targetDocument` and `discriminatorMap` are set? And then throwing a new exception class? If yes then...
@alcaeus initial PR for it that I've made seems to be a little to aggresive (`isset` checks are to broad and cause exception to be thrown even then it shouldn't)....
@alcaeus what's the prefered approach for this? From your comment I assume - maybe wrong - that those two annotation properties should be able to simultanously exist?
@alcaeus is it expected behavior then that calling `persist` on a new document with ID set beforehand will be upserted to MongoDB? I'm asking to know should I rely on...
> 2\. Examples must be complete (they cannot reference classes that do not exist or are left as an exercise to the reader) This can be circumvented by using [stubs](https://phpstan.org/user-guide/stub-files),...
> @Steveb-p what is the benefit here? IMHO this rather leads to bad practices. You can name indices for a very good reason - you can work with them easily...