db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Braeuchi <jbraeu...@gmx.ch>
Subject Re: query for extents joining with null table
Date Tue, 08 Apr 2003 19:08:50 GMT
checked it in

Jakob Braeuchi wrote:

> i'll do additional test and in case everything goes fine i'll check it in
>
> jakob
>
> Leandro Rodrigo Saad Cruz wrote:
>
>> Yes.... it doesn't uses null for table names anymore !
>>
>> thanx...
>>
>> On Tue, 2003-04-08 at 14:17, Jakob Braeuchi wrote:
>>  
>>
>>> hi leandro,
>>>
>>> i think i already have one:
>>>
>>> modifiy the collection descriptor of ProductGroup in 
>>> repository_junit.xml to point to AbstractArticle:
>>>
>>>      <collection-descriptor
>>>         name="allArticlesInGroup"
>>>         element-class-ref="org.apache.ojb.broker.AbstractArticle"
>>>         auto-retrieve="true"
>>>         auto-update="true"
>>>         auto-delete="false"
>>>      >
>>>
>>> that results in a NULL table.
>>>
>>> jakob
>>>
>>> Leandro Rodrigo Saad Cruz wrote:
>>>
>>>   
>>>
>>>> I'll try to write a test case for this !
>>>>
>>>> On Tue, 2003-04-08 at 13:08, Jakob Braeuchi wrote:
>>>>
>>>>
>>>>     
>>>>
>>>>> hi leandro,
>>>>>
>>>>> could you please send me the java-classes, repository and the sql 
>>>>> to create the necessary tables ?
>>>>>
>>>>> jakob
>>>>>
>>>>> Leandro Rodrigo Saad Cruz wrote:
>>>>>
>>>>>  
>>>>>       
>>>>>
>>>>>> Hi Jacob !
>>>>>>
>>>>>> I'm upgrading from 0.9.8 to 1.0.rc2 an I got this problem :
>>>>>>
>>>>>> _________________       ________________
>>>>>> |                |     |                |
>>>>>> | AbstractClassA |1---*| AbstractClassB |
>>>>>> |________________|     |________________|
>>>>>>      ^                       ^
>>>>>>      |                       |
>>>>>> -------------          ---------------   |           |          
>>>>>> |              |
>>>>>> ____         ____       ____          ____
>>>>>> |    |       |    |     |    |        |    |
>>>>>> | A1 |       | A2 |     | B1 |        | B2 |
>>>>>> |____|       |____|     |____|        |____|
>>>>>>
>>>>>>
>>>>>> When I use OJB like this :
>>>>>>
>>>>>> <java>
>>>>>> Criteria crit = new Criteria()
>>>>>> crit.addEqualTo("allBs.name",someName)
>>>>>> QueryByCriteria query = new 
>>>>>> QueryByCriteria(AbstractClassA.class,crit);
>>>>>> Collection result = broker.gteCollectionByQuery(query)
>>>>>> <java>
>>>>>>
>>>>>> I get an error because ojb is joinning with three tables
>>>>>> AbstractClassB - NO TABLE
>>>>>> B1             - TABLE_B_1
>>>>>> B2             - TABLE_B_2
>>>>>>
>>>>>> <sql>
>>>>>> SELECT *    
>>>>>>         
>>>>>> FROM TABLE_A_1 A0 INNER JOIN ((((((TABLE_A_VERSUS_B A1 INNER JOIN

>>>>>> null
>>>>>
>>>>>  
>>>>>       
>>>>>
>>>>>> A2 ON A1.AID_ID=A2.AID) LEFT OUTER JOIN TABLE_B_1 A2E1 ON
>>>>>> A1.AID=A2E1.ID) LEFT OUTER JOIN TABLE_B_2 A2E2 ON ...
>>>>>> </sql>
>>>>>>
>>>>>> We are trying to join with the table that AbstractClassB should 
>>>>>> have,
>>>>>> but it doesn't ! I looked at SqlQueryStatement.java and I'm not sure
>>>>>> where I have to make modifications for this to work.
>>>>>>
>>>>>> When I first implemented extent aware path expressions I put a log
>>>>>> warning (see createTableAlias(ClassDescriptor cld, String path))

>>>>>> about
>>>>>> abstract classes, but I think there is not place anymore where we

>>>>>> check
>>>>>> for this !
>>>>>>
>>>>>> Can you help me solve this problem !
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>    
>>>>>>         
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>>>>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>>>>
>>>>>
>>>>>  
>>>>>       
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>>
>>>
>>>   
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>


Mime
View raw message