我正在尝试将 extends GenericModel 与 blob 数据类型一起使用,但出现错误:
Execution error occured in template
{module:crud}/app/views/tags/crud/form.html. Exception raised was
MissingPropertyException : No such property: id for class: models.Member.
In {module:crud}/app/views/tags/crud/form.html (around line 56)
#{crud.passwordField name:field.name, value:(currentObject ? currentObject[field.name] : null) /}
#{/if}
#{if field.type == 'binary'}
#{crud.fileField name:field.name, value:(currentObject ? currentObject[field.name] : null), id:currentObject?.id /}
#{/if}
#{if field.type == 'longtext'}
#{crud.longtextField name:field.name, value:(currentObject ? currentObject[field.name] : null) /}
#{/if}
我的模型是:
@Entity
@Table(name = "news_feed")
public class NewsFeed extends GenericModel {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Long news_id;
public Blob news_image;
...
}
extends GenericModel
如果我删除或删除 blob,我不会收到错误消息。是什么导致了问题?
欢迎所有帮助。
谢谢!