ngs-doo / revenj

DSL Platform compatible backend

Home Page:https://dsl-platform.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can structs have mixins?

Kobus-Smit opened this issue · comments

Hi @zapov

Can structs have mixins?

module test {

mixin my_mixin {
  string id;
  string name;
}

struct my_struct {
  has mixin my_mixin;
}

}
System.Configuration.ConfigurationException
  Message=Couldn't find column id in type test.my_mixin. Check if database is out of sync with code
  StackTrace:
   at _DatabaseCommon.Factorytest_my_mixin.my_mixinConverter.InitializeProperties(DataTable columnsInfo)
commented

This is a fallout of some optimization.
mixins don't have DB representation when they are only used in structs

Code should compile now in latest version

Great thanks @zapov !