Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个实体e1并创建一个新实体e2。我愿意:
E2 e2 = new E2(); e2.setE1(e1); save(e2);
e2在数据库中正确创建,但即使e1本身没有更改, e1的版本号也会增加。这是正确的行为还是在我的 equals 方法之类的地方有问题?