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 和 Hibernate 来实现。
您可能应该在不同的字段/表中分开名称和值。请解释我们为什么你不想要...
但是,如果您有充分的理由,只需用“特殊字符”分隔键/值,例如nor|中不能包含的任何字符。但这是一种危险的方法......namevalue
|
name
value