goadesign / goadesign/gorma-cellar

Changing HasMany("Bottles","Bottle") into HasOne("Bottle") creates compiler error

Open
#1 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
13
Forks
4
PR merge metrics
No merged PRs in 30d

Description

I am new to Goa and Gorma and experimenting with this gorma-cellar example. If I understand correctly, then it should be possible to change this line
https://github.com/goadesign/gorma-cellar/blob/master/design/models.go#L20
HasMany("Bottles","Bottle")
into:
HasOne("Bottle")

But doing so results in a compiler error:
models/bottle.go:41: invalid recursive type Bottle
Does this mean HasOne() has a bug ? Or is using Gorma not _that_ easy ;-)

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.