Hello OJB-Users, I haven't get any feedback on this email yet, so I try it once more. The problem is that the Informations from the Foreign key are Primary-Key + hardcoded String. How can I add the hardcoded String to my 1:1 reference? For 1:n, it's no Problem, because I can add the String to the Query in an QueryCustomizer
---------------------------------------------------------------------------------------------------------------------- I have even started using OJB and so far all works fine :o) (1:1, 1:n...) I would be pleased when you can help me with my first Problem. I'm looking for an solution like 'Customizing collection queries' descriped in the Guide 'advanced O/R technique' for 1:1 references. A short example: I have multible tables (named parts, driver...) and for each entry of a table i can reference to ONE entry of a table named memo across the primary-key as foreign key in the memo-table. To have a unique key, I musst save a second value in the memo-table to know from which table the foreign-key comes. This value is a String and is hardcoded in the software. For table parts i save = "part" in the table Memo field parentTable For table driver i save = "driv" in the table Memo field parentTable Now, when I'm loading the memo to an item of the parts-table, I want' only load the memo where in table Memo parentTable="part" With a 1:n, thats no Problem, because I can work with the query-customizer like this ################################ <inverse-foreignkey field-ref="parentObjId"/> <query-customizer class="de.on_ergy.lakon.data.QueryCustomizerLakonImpl"> <attribute attribute-name="parentTable" attribute-value="TEILSTAM" /> </query-customizer> ################################ There I can add the value "TEILSTAM" to the Query with the written QueryCustomizerLakonImpl But how can I realize this with 1:1 ?? Thank you very very much for your help. Best Wishes Josef Wagner /Germany
