Skip to content

The use of BelongsTo #161

Description

@eullerpereira94

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions