开发者

How to setup a relationship so that more than one type of object can be in a set with Spring Roo

开发者 https://www.devze.com 2023-01-13 10:27 出处:网络
My domain thus far looks like: ~.domain.RenderJob ~.domain.RenderLayer ~.domain.ImageLayer extends ~.domain.RenderLayer

My domain thus far looks like:

~.domain.RenderJob
~.domain.RenderLayer
~.domain.ImageLayer extends ~.domain.RenderLayer
~.domain.ColorLayer extends ~.domain.RenderLayer

I'd like to add a set field to RenderJob named 'layers'. Elements in the set can be either of type ImageLayer or ColorLayer, both of which extend RenderLayer. Is there 开发者_如何学运维a way to set up the layers field so that it will accept either of the two types of layers?


well I think this will work for you

field set --fieldName layers --element ~.domain.RenderLayer --class ~.domain.RenderJob

Thanks

Shekhar

0

精彩评论

暂无评论...
验证码 换一张
取 消