Hello, > What about my case where I have 2 back-ends (SQLServer and Oracle)? Let's > say I have a BIT in one (Boolean) and a Number in the other (Short). For > fields, you said that this would work because there is type conversion. But > is this going to work with type mapping if I generate a model against one of > the RDBMS and run on the other?
Once the schema is generated, a field's type will then be fixed to Boolean for SQL Server's BIT. This will work with Oracle's NUMBER field. You don't need a converter for that. If you want to generate the schema from Oracle's NUMBER type, you'll have to apply a "forced type" upon that field > Out of curiosity, can we augment an already existing MyEnum to implement the > Converter interface so all code is located at a single place if we want it > to? Would jOOQ allow it? Java enum types can implement any interface. I don't see any problem with that. Beware that enum types cannot extend base classes for convenience... > What would happen if one generated schema defines certain mappings, and > another generated schema defines other mappings but for the same types > (especially calendars or dates)? Running with one would be fine but could > running with two result in collisions in the registry? The mappings' scope is not a single schema. Cheers Lukas
