Yes, I know it doesn't work because of duplicate columns in generated SQL statements.
You say "this is on the todo list for 4.0" - does it mean it's correct (according to the specs) to have CMR and CMP accessors for one column, but just current version of JBoss doesn't support it? Pavel On Thu, 15 Aug 2002, Dain Sundstrom wrote: > This doesn't work. You end up with sql statements that have duplicate > columns in them. This is on the todo list for 4.0. > > -dain > > Pavel Kolesnikov wrote: > > Hello, > > > > in my application, I need to synchronize content of database > > tables on the central server with client application, which > > should be able to work offline. > > > > That's why I need a simple way, how to get values of foreign > > keys in dependent tables. But I also want to be able to use > > MR 2.0 accessors to manipulate data. > > > > My questions are: > > > > 1, is this correct according to specs (I guess it doesn't say > > anything about it)? > > 2, will it work in JBoss 3.0.1? (my EJB gets deployed, but > > if underlying tables don't exist, JBoss attemps to create > > them using duplacate column names). > > > > Example: > > > > if I used Gangster-Organization example from the User Guide, > > I'd need something like this: > > > > public abstract class GangsterBean implements EntityBean { > > public abstract Integer getOrganizationId (); // CMP foreign key > > public abstract Organization getOrganization (); // CMR using > > // organizationId as a foreign key > > } > > > > If I tried to deploy such class and let JBoss to create tables, > > JBoss would say: > > > > org.jboss.deployment.DeploymentException: Error while creating table; - > > nested throwable: (java.sql.SQLException: Invalid argument value: > > Duplicate column name 'organizationId') > > > > If I told JBoss not to create tables, it would deploy may beans > > without complaining. > > > > I guess if my approach is correct, JBoss should be able to create > > tables correctly, and if my approach is wrong, JBoss shouldn't > > never deploy such beans. > > > > Any ideas? > > > > Thanks, > > > > Pavel > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by: Dice - The leading online job board > > for high-tech professionals. Search and apply for tech jobs today! > > http://seeker.dice.com/seeker.epl?rel_code=31 > > _______________________________________________ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > ------------------------------------------------------- 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