2011-12-10 50 views
1

我有一個實體,名爲Album,它與Author的關係爲@ManyToOne顯示收集問題

嗯,我想在我的HTML文件中像這樣來顯示作者的名字:

Author is: #{a @SermonsIndex.sermonsByAuthor(albums.author.name)}${albums.author.name}#{/a} 

出於某種原因,它打印的名稱,如:[Elvis]所以追加「[」和「]」 (Elvis

你知道爲什麼嗎?

回答

1

對不起,有這樣一個基本問題。當然,作爲一個集合,我應該使用索引來獲得它,例如:

Author is: #{a @SermonsIndex.sermonsByAuthor(albums[0].author.name)}${albums[0].author.name}#{/a}