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.
JPA @Converter 和 @ReadTransformer / @WriteTransformer 有什么区别。似乎两者都用于同一个pourpouse:db表示和de模型对象表示之间的转换。
它们相似,主要区别在于 @Converter 只能用于单个列,而 @Transformation 可以写入多个列。
一般来说,我建议使用@Converter,除非映射需要多列。