In JPA is there an annotation to specify that boolean fields should be persisted as an integer. I'm using OpenJPA and it's currently persisting boolean fields as bits. I'd rather use integer 1 or 0.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
You can specify the column definition:
You can use the following annotation:
If you want to write Y and N instead of 0, 1, you can use