|
Re: Migration problems: Enhydra5.0 to Enhydra5.1: msg#00022java.enhydra.general
On Fri, 2003-10-03 at 14:13, Axel Wilhelm Berle wrote: > > As for our configuration: > > - Java 1.4.2 O.K. > - Postgres O.K. > - we generate the xxxDO classes ourselves This is the problem. We have introduced many changes in DODS code, and one of them obviously gets in your way. > > The DO's returned by a query don't have a valid OId. > > Example: After querying the database, the > > PersonDO.get_OId() always returns null! (the other > > fields seem to be ok). CoreDO (com.lutris.appserver.server.sql.CoreDO) now doesn't know anything about OId, version, instead it relies on CoreDataStruct (in same package). If you look at generated classes for examples, you'll see that for each table we generate (xxxDOI, xxxDO, xxxQuery, and xxxDataStruct). The last one extends CoreDataStruct and contains data members of a DO (version, newVersion, and OId too). It is responsibility of a generated DO class to initialize its datastructs, CoreDO doesn't do it. Please insert this method in CounterDO (and other xxxDO) classes, and try if you still have this problem. Obviously you must write CounterDataStruct class, because CoreDataStruct is abstract. protected void set_OId(ObjectId _oId) { if (originalData == null) originalData = new CounterDataStruct(); originalData.set_OId(_oId); } Other solution is to use a DOML file with generator and produce entirely new DO classes. If you have old DOML you should translate it using olddoml_2_doml51 utility. We implemented lot of improvements (DataStructs cache, update optimization, queries by OIds only, ...) and these you cannot use with old xxxDO classes. Hope this helps. -- Vladimir Puskas <v.puskas@xxxxxxxxxxxxxx> Together, Serbia
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: dods task, Sinisa Milosevic |
|---|---|
| Next by Date: | Server.AutoReload in Enhydra 5.0, Marco Leal |
| Previous by Thread: | Migration problems: Enhydra5.0 to Enhydra5.1, Axel Wilhelm Berle |
| Next by Thread: | Re: Enhydra: Migration problems: Enhydra5.0 to Enhydra5.1, Alfred Madl |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |