goadesign / goadesign/gorma

The use of BelongsTo

Open
#161 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
141
Forks
35
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.