我有一个多值字段
<arr name="colors">
<str>Blue</str>
<str>Red</str>
<str>Orange</str>
<str>Pink</str>
<str>Violet</str>
</arr>
像这样填写:
<entity name="pub_attributes" query=" SELECT name [description] FROM dbo.Colors">
<field name="colors" column="description" />
</entity>
我需要另一个具有所有颜色的字段,但只有一行用白色空格分隔,如
<str name="Colors_All">Bue Red Orange Pink Violet</str>
如果不重新访问Colors表,我怎么能这样做? 也许是这样的
<entity name="Properites_all" query="
DECLARE @all VARCHAR(MAX)
SET @all = ''
Select @all = @all + ... from '${pub_attributes.colors}'
UNION
Another SELECT that will add more info than just the colors
">
<field name="colors_all" column="description" />
</entity>