Spring 1.2.1, Hibernate 3.0.5, Oracle 9i, JDK 1.4.2.
I'll provide background on my situation in case there's a better way to do this.
I have a table which defines validations on fields on three different message types that I can process. Some of the validation entries apply to all the message types, and some apply to particular subsets of the message types.
When I'm processing a message, I need to get the list of validation entries for that message type.
From a high level, I was thinking that the message type column could be a bitmap. Bit 0 represents message type 1, bit 1 message type 2, etcetera. In order for this to work, I'd have to be able to do something like this in the query:
fv.msg_type & :msg_type: = :msg_type:
I don't see any way to do that in Hibernate (or SQL?).
If I can't do anything like this, for each row that applies to more than one message type, I'll just have to duplicate each row, except have different msg_type values. That would be annoying.
|