Skip to content

Commit

Permalink
Merge pull request #71 from SchwarzIT/bugfix/resolvebasemodelrecursive
Browse files Browse the repository at this point in the history
# based models are now resolved with multiple basedon layer chains
  • Loading branch information
sbra0902 authored Feb 28, 2023
2 parents 9db7daf + da94b8b commit 5af1f27
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ object EntityFactory {
}
content.generateAccessors.addAll(it.generateAccessors)
content.queries.addAll(it.queries)
addBasedOn(it.sourceElement, allBaseModels, content)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.schwarz.crystaldemo.entity

import com.schwarz.crystalapi.*
import com.schwarz.crystaldemo.customtypes.GenerateClassName

@com.schwarz.crystalapi.BaseModel
@MapWrapper
@Entity
@Fields(
Field(name = "andAnotherBaseThing", type = String::class),
Field(name = "clazzName", type = GenerateClassName::class, defaultValue = "GenerateClassName(this::class.simpleName ?: \"\")")
)
@BasedOn(AnotherBaseModel::class)
open class AndAnotherBaseModel

0 comments on commit 5af1f27

Please sign in to comment.