bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #18938] Wrong nullify in ToMany relationship


From: Manuel Guesdon
Subject: [bug #18938] Wrong nullify in ToMany relationship
Date: Fri, 02 Feb 2007 18:36:56 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040804 Galeon/1.3.17

URL:
  <http://savannah.gnu.org/bugs/?18938>

                 Summary: Wrong nullify in ToMany relationship
                 Project: GNUstep
            Submitted by: mguesdon
            Submitted on: vendredi 02.02.2007 à 19:36
                Category: gdl2
                Severity: 4 - Important
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Having 2 entities like this:
                {
                        attributes = (
                                        {
                                                columnName = code;
                                                externalType = int4;
                                                name = code;
                                                valueClassName = NSNumber;
                                                valueType = i;
                                                allowsNull = N;
                                        },
                                    );
                        attributesUsedForLocking = (code);
                        classProperties = (code,toEntity2);
                        externalName = entity1;
                        primaryKeyAttributes = (code);
                        name = Entity1;
                        className=Entity1;
                    relationships = (
                                                {
                                                        destination = Product;
                                                        joinSemantic = 
EOInnerJoin; 
                                                        isToMany = Y;
                                                        isMandatory = N; 
                                                        isBidirectional = Y;

                                                        joins = (
                                                                           {
                                                                                
destinationAttribute = foreignCode;
                                                                                
joinOperator = EOJoinEqualTo; 
                                                                                
joinSemantic = EOInnerJoin; 
                                                                                
sourceAttribute = code;
                                                                            }
                                                                    ); 
                                                        name = toEntity2;
                                                }
                                                ); 
                }
















                        {
                        attributes = (
                                        {
                                                columnName = code;
                                                externalType = int4;
                                                name = code;
                                                valueClassName = NSNumber;
                                                valueType = i;
                                                allowsNull = N;
                                        },
                                        {
                                                columnName = foreign_code;
                                                externalType = int4;
                                                name = foreignCode;
                                                valueClassName = NSNumber;
                                                valueType = i;
                                                allowsNull = Y;
                                                userDictionary = { 
isUserNotNull = YES; min=1; max=INT_MAX; };
                                        }
                                     );
                        attributesUsedForLocking = (code);
                        classProperties = (code,foreignCode,toEntity1);
                        externalName = entity2;
                        name = Entity2;
                        className=Entity2;
                        primaryKeyAttributes = (code);
                    relationships = (
                                                        {
                                                        destination = Entity1;
                                                        joinSemantic = 
EOInnerJoin; 
                                                        isToMany = N;
                                                        isMandatory = N; 
                                                        isBidirectional = Y;

                                                        joins = (
                                                                                
{
                                                                                
destinationAttribute = code;
                                                                                
joinOperator = EOJoinEqualTo; 
                                                                                
joinSemantic = EOInnerJoin; 
                                                                                
sourceAttribute = foreignCode;
                                                                            }
                                                                            ); 
                                                        name = toEntity1;
                                                        }
                                                );
                }




For an existing Entity2 object having a toEntity1 relationship to ObjectA,
changing this relationship to ObjectB sometimes save NULL in  foreignCode
instead of ObjectB code.
This append when update are propagated first with objectB as sourceObject (it
assign the objectB value to foreignCode) and _next_ with objectA (which
nullify foreignCode).
If propagation first take objectA and next objectB, there's no problem.

The nullify operation is done in In EODatabaseContext
-nullifyAttributesInRelationship:sourceObject:destinationObject:

Any idea on this ? Should we firs apply all nullify operations and next all
relay operations ?

Manuel








    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?18938>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]