创建实体对象时出现空指针异常

时间:2015-12-30 08:54:08

标签: java hibernate jpa

我有一个实体,我正在为它创建对象。对象已创建,我可以设置值。但参考显示为null。我不明白为什么。请检查我的代码:

/* $('.nav').click(function( { */

在B组我正在创建对象@Entity @Table(name = "a_table") public class A { private static final long serialVersionUID = -8674959693713707364L; /** The id. */ @Id @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "IdOrGenerated") @GenericGenerator(name = "IdOrGenerated", strategy = "foo.IdOrGenerated") @Column(name = "id") private Long id; private Creator creator; public A() { } public A(Creator pCreator) { this.creator = pCreator; } //setters and getters for id and creator } 当我调试并看到' value为null。

0 个答案:

没有答案