Actually, reading the changes in the factory, it seems you already have the factory parameterized and have it set up the constraint properly. This code is then a bit more perplexing because you did not use the mechanism you just implemented.