David Ward wrote: > I understand your point, but man that's harsh. It implies that the > table defaults be specified in two tiers, introducing a possible > maintenance problem. Actually, this is a bigger issue than just > defaults - also triggers modifying data out from under an entity, > sequences and auto-generated keys, etc. I know the auto-gen key thing > is addressed in jdk1.4, but 1) not all driver providers have implemented > it and 2) not all app servers can use it yet. When using entities - > especially CMP ones - with rdbm's that use these features, it seems that > changing your bean's commit-option isn't always enough. Just me > thinking out loud.
You can use read-only fields for fields that are filled in by the database, but you can't write to these fields. It may be possible to support defaults in the future but it is not easy. You would not be able to access the field until the row is inserted into the database. This will definitely create a problem for the delayed insert feature planed for 4.0. The delayed insert feature allows for not null foreign key fields and foreign keys as part of primary keys. Defaults are way lower on the food chain then not null foreign keys, so it is unlikely to get in. I'll think about this when adding the new feature, but it will most likely not get in. > PS: Any idea when jbosscmp-jdbc.xml will support a tag that specifies > auto-gen keys (implying it's running w/jdk1.4 and a jdbc driver that > supports auto-gen keys)? Alex is working on this now, and he already has some code that works with mySQL. It should be in with in a the next two weeks. Then I think we'll back port it to JBoss 3.2. -dain ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
