db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@mankin.org.uk
Subject Re: URGENT!! Optinanal foreign key column not deleting
Date Sun, 04 Jul 2004 18:06:05 GMT
I suspect this might be an instance of a problem that was discussed some months
back. Various things do not work if a table has no primary key. You must have a
primary key, even if you never use it.


On 04-Jul-2004 Vjeran Marcinko wrote:
> I noticed that this problem happens only in junction tables (just foreign
> keys columns), and when these columns are optional (can be null) ...
> 
> -Vjeran
> 
> ----- Original Message ----- 
> From: "T E Schmitz" <mailreg@numerixtechnology.de>
> To: "Apache Torque Users List" <torque-user@db.apache.org>
> Sent: Sunday, July 04, 2004 6:32 PM
> Subject: Re: URGENT!! Optinanal foreign key column not deleting
> 
> 
>> Hello,
>> I am not quite sure why criteria / doSelect should return a result while
>> criteria / doDolete doesn't for the same values.
>>
>> But bear in mind that for doDelete and doUpdate "no hits" is not an
>> error. Therefore no exception is thrown. In fact, you don't get any
>> feedback at all. This in itself is a problem for some applications.
>>
>> You mention that you use "object" types rather than primitive. Have you
>> tried using  new Integer(95) as a Criteria parameter?
>>
>>
>> > Criteria crit = new Criteria();
>> >         crit.add(TmModelProfilePeer.MODEL_ID, 95);
>> >         List list = TmModelProfilePeer.doSelect(crit);
>> >
>> > and eveything works fine. But when I want to delete these rows by same
>> > criteria :
>> >         Criteria crit = new Criteria();
>> >         crit.add(TmModelProfilePeer.MODEL_ID, 95);
>> >         TmModelProfilePeer.doDelete(crit);
>> > it doesn't work. No exception, just no deletion. ??!!
>>
>> -- 
>>
>>
>> Regards/Gruß,
>>
>> Tarlika Elisabeth Schmitz
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 

-- 
                               Lead us not into temptation; we
                               can find our own way.


Raphael Mankin
----------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message