我想将SQL查询结果赋值给非实体类中的Java对象。我的查询是计算表A中映射到另一个表B的记录数。value="select count(a.id) from table1 a join table2 b on a.id=b.id group by a.id", nativeQuery=true) private long count;
我在EF / AutoMapping工作。我想在插入后立即插入记录的Id (PK)。你怎么做到的?是否可以在插入后立即刷新数据? public int InsertArtist(ArtistDto artistDto) Artist entity = _mapper.Map<ArtistDto, Artist>(artistDto);
_artistRepository.Save();
}