From: Gavin_King/Cirrus%<CI...@ci...> - 2002-03-05 15:24:26
|
> There needs to be a way to tell hibernate to use the native key > generator for a table. And the code needs to check for it. Do you think > its better to compare the class of the keygenerator? hhmmmmm instanceof sort of looks bad though in this case its perfectly defensible. My suggestion was to have ClassPersister.isUsingNativeKeyGeneration() or something. But then you would need to set that up in the first place which would involve doing either an instanceof or equivalent anyway.... How about if we use instanceof in the constructor of ClassPersister where its nice and hidden away and no-one will notice it ;) I'm not quite joking; I'd prefer "expedient" things in any class other than RelationalDatabaseSession. Yeah, I know I wouldn't be able to defend this if pressed .... whatever ..... just stick an instanceof wherever you think is right..... I'm rambling today.... > What? no blobs? :P > how does postgres handle binary data then? Very Badly. http://www.postgresql.org/idocs/index.php?lo-interfaces.html Actually there are large objects but theres some wierd way of using them I don't understand.... Also theres a varbinary type, of course. > I will have to add two things to Dialect: one for the identity select, > and one for the creation of the identity column. Thats all good. I'm not at all perturbed by that (anyway Dialect is an abstract class, not an interface, so we can do more with it). |