fluent
fluent copied to clipboard
The oneToOne relation not exist joinColumn method
public function map(Fluent $builder){ $builder->entity()->setRepositoryClass(DiscussionDoctrineRepository::class); $builder->table('my_discussion'); $builder->increments('id'); $builder->string('title'); $builder->string('content'); $builder->string('cover'); $builder->string('createTime'); $builder->string('startTime'); $builder->string('endTime'); $builder->string('status'); $builder->string('hot')->columnName('hot_score'); $builder->oneToOne(User::class, 'user')->joinColumn('uid', 'uid'); }
above joinColumn not exist joinColumn method, is bug?
It may be missing, yes.
PR is more than welcome
Have you planned to repair it?
Not the answers I was expecting on "PR is more than welcome" ;) It will be fixed sometime, but currently don't have time for it.
@saintho All associations have a getAssociation() method that will expose Doctrine's AssociationBuilder object. You can always work around Fluent and go directly to Doctrine's php mapper, so this is not something to fix, rather a missing feature.
Also, this is an open source effort. We'll gladly receive contributions and completely ignore "fix demands". Please be the former and not the latter ;-)
Okay, I will commit PR in this weekend @guiwoda