Re: [Objectbridge-developers] Object Bridge Newbie
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2001-09-21 15:38:22
|
Hi Charles, Right now the XML FieldDescriptors MUST be in the same sequence as the COLUMNS of the underlying table. AND their ids must match the column-number. I.e. the first descriptor must map on column one and have the id 1. The nth descriptor must map on column n and must have id n. But you have discovered a little inconsistency: for inserts the exact numbering is currently not checked. I will fix this inconsistency. After this fix the descriptors must only have an ID matching the column number. HTH, Thomas Charles Anthony wrote: > > Hi All, > > I'm beginning to play about using OJB with some of my own classes and > tables, and I seem to be getting some bizarre behaviour; it seems that > setting an attribute on a class tries to modify a different column on the > database than is specified in the mapping file. This only seems to happen on > an update, not on an insert. > > It seems that the order of FieldDescriptors in the file is significant; and > possibly the id attribute of the FieldDesciptor. > > I think perhaps I might be able to dig a little more out about whats going > on if I understood how OJB uses the mapping file; does it cross-reference > the column in the file with the field on the class by > a) name ? > b) position of the FieldDescriptor in the file with the position of the > field in the class (e.g. the first FieldDescriptor->first declared field in > the class) ? > c) id of the FieldDescriptor in the file with the position of the field in > the class (e.g. <FieldDescriptor id="1"> ->first declared field in the > class) ? > d) Something else ? > > a) would seem to me to be the best way of doing it, but I don't think this > is the way it is done. > > Any help would be welcomed, > > With thanks, > > Charles > > This email and any attachments are strictly confidential and are intended > solely for the addressee. If you are not the intended recipient you must > not disclose, forward, copy or take any action in reliance on this message > or its attachments. If you have received this email in error please notify > the sender as soon as possible and delete it from your computer systems. > Any views or opinions presented are solely those of the author and do not > necessarily reflect those of HPD Software Limited or its affiliates. > > At present the integrity of email across the internet cannot be guaranteed > and messages sent via this medium are potentially at risk. All liability > is excluded to the extent permitted by law for any claims arising as a re- > sult of the use of this medium to transmit information by or to > HPD Software Limited or its affiliates. > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |