Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The oneToOne relation not exist joinColumn method #50

Open
saintho opened this issue Aug 31, 2017 · 6 comments
Open

The oneToOne relation not exist joinColumn method #50

saintho opened this issue Aug 31, 2017 · 6 comments

Comments

@saintho
Copy link

saintho commented Aug 31, 2017

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?

@guiwoda
Copy link
Contributor

guiwoda commented Aug 31, 2017

It may be missing, yes.

@patrickbrouwers
Copy link
Contributor

PR is more than welcome

@saintho
Copy link
Author

saintho commented Sep 1, 2017

Have you planned to repair it?

@patrickbrouwers
Copy link
Contributor

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.

@guiwoda
Copy link
Contributor

guiwoda commented Sep 1, 2017

@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 ;-)

@saintho
Copy link
Author

saintho commented Sep 4, 2017

Okay, I will commit PR in this weekend @guiwoda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants