简体   繁体   English

从hibernate查询中排除实体bean属性?

[英]Exclude entity bean attributes from hibernate query?

I'm new to this hibernate/jpa stuff so bear with me.. 我是这个hibernate / jpa的新手,所以请耐心等待..

I've generated an entity bean and it works fine, but I would like to add some extra attributes to it and this causes hibernate to complain that the extra attributes aren't in the table's field list.. 我已经生成了一个实体bean,它工作正常,但我想为它添加一些额外的属性,这会导致hibernate抱怨额外的属性不在表的字段列表中。

Is there a keyword to exclude these attributes from hibernate's query?? 是否有一个关键字从hibernate的查询中排除这些属性?

将它们标记为@Transient

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM