Using @Column in EJB
Hello!
I encountered this problem. I want to change column name in mapping with @Column annotation.
@Entity
public class FooWorker implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column (name = "foofoo")
private String foo;
...
}
@Column annotation is highlighted with error: "Cannot resolve symbol." and IDEA proposes to assigning PU datasource. I got assigning working ok.
persistent.xml looks like this:
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
jwt.FooWorker
]]>
I checked it in netbeans and it works ok. Why IDEA isn't ok with that?
cheers :)
请先登录再写评论。
Hello Wiktor!
Looks like you don't have any @Table annotation for your entity,
so the column table is not known.
Wiktor Gworek wrote:
Hi,
Actually, I still encounter this problem.
I have tested it, Even add @Table into code. this problem still will occur.
If I ingore this error, and then execute my code, it could work fine without any mistake.
But the error information still will make me unhappy.