Open lumtis opened 3 years ago
Shouldn't this:
starport scaffold type comment content
starport scaffold list post title content comment:list(Comment)
Be:
starport scaffold list comment content
starport scaffold list post title content comment:comment
Or is the problem that in scaffold list post...
we can't deduce that a comment
has been scaffolded as a list
?
Adding the field type name
list(<typename>)
(or other format), that would allow to scaffold a nestedlist
inside a typeWith
indexed-list
https://github.com/tendermint/starport/pull/1733 the necessary structures can be scaffolded for nested listHowever, the relation logic between
comment
andpost
must still be manually defined by the user. Whilelist
as a field type would allow us to scaffold the useful method and checks (checking that the post exist for each operation)So
starport scaffold list post title content comment:list(Comment)
would additionally scaffold in keeper:And CLI commands: