ApplyRecord a = new ApplyRecord();a.target="1";a.target="2";用ORM存到数据库,发现有少数情况存的是1,很奇怪,求大神给点意见
ApplyRecord是在哪里定义的。程序中有没有别的地方修改了它。比如ApplyRecord a = new ApplyRecord();ApplyRecord b = a;a.target="2";b.target="1";此时,因为a b指向同一个对象,所以a.target也变成了1。