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 use of BelongsTo #161

Open
eullerpereira94 opened this issue Dec 12, 2017 · 0 comments
Open

The use of BelongsTo #161

eullerpereira94 opened this issue Dec 12, 2017 · 0 comments

Comments

@eullerpereira94
Copy link

In the last week I was messing around with gorma and I've noticed something: a model can't belong to two different models. I'm not talking about the philosophy behind the relational model. What I'm talking is about this:

`
Model("ThisModel", func() {

	Alias("schema.thismodel")

	RendersTo(ThisModelMedia)

	BuildsFrom(func() {
		Payload("thismodel", "create")
		Payload("thismodel", "update")
	})

	BelongsTo("ThatOtherModel")

	BelongsTo("AThirdModel")
})

`

This makes the goagen tool unable to generate the appropriate code, in fact, any code, since it exits with a code 1.

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

No branches or pull requests

1 participant