Re: wrong column name with eo and relationships
Re: wrong column name with eo and relationships
- Subject: Re: wrong column name with eo and relationships
- From: John Larson <email@hidden>
- Date: Tue, 18 Jul 2006 23:58:50 -0500
I checked and double checked. I tried leaving the abstract table's
name blank and marking it as read only because that's what the
example did in the horizontal example with the abstract objects.
Same thing.
When I did this change, I made 8 entities abstract and created 23
subclasses. Not one relationship from any entity to any one of the 8
abstract classes works. I'm going to bed, but the only thing I could
see that looked odd was the internalInfo / _nameInObjectStore entry.
For each subclass, the nameInObjectStore was set to the abstract
class's Java class name. I tried deleting it, renaming it, and
basically making a mess before I needed sleep.
I've done this before and its worked! This is ridiculous! The fact
that not one of the entities works makes me think that it has to be
something more fundamental from when I made the objects abstract. I
have included the plist file for an abstract entity and a subclass.
(they're the smallest ones i have)
John
{
attributes = (
{
allowsNull = Y;
columnName = opNumber;
externalType = int;
name = opNumber;
valueClassName = NSNumber;
valueType = i;
},
{
columnName = pkid;
externalType = int;
name = pkid;
valueClassName = NSNumber;
valueType = i;
},
{
allowsNull = Y;
columnName = scid;
externalType = int;
name = scid;
valueClassName = NSNumber;
valueType = i;
},
{
allowsNull = Y;
columnName = text;
externalType = varchar;
name = text;
valueClassName = NSString;
width = 100;
}
);
attributesUsedForLocking = (pkid);
className = Routing;
classProperties = (toStockCode, opNumber, text);
fetchSpecificationDictionary = {};
internalInfo = {"_clientClassPropertyNames" = (toStockCode,
opNumber, text); };
isAbstractEntity = Y;
isReadOnly = Y;
name = routing;
primaryKeyAttributes = (pkid);
relationships = (
{
destination = stockCodes;
isToMany = N;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = pkid; sourceAttribute =
scid; });
name = toStockCode;
}
);
userInfo = {fetchSpecificationDictionary = {}; };
}
{
attributes = (
{
allowsNull = Y;
columnName = machineID;
externalType = int;
name = machineID;
valueClassName = NSNumber;
valueType = i;
},
{
allowsNull = Y;
columnName = opNumber;
externalType = int;
name = opNumber;
valueClassName = NSNumber;
valueType = i;
},
{
columnName = pkid;
externalType = int;
name = pkid;
valueClassName = NSNumber;
valueType = i;
},
{
allowsNull = Y;
columnName = rateID;
externalType = int;
name = rateID;
valueClassName = NSNumber;
valueType = i;
},
{
allowsNull = Y;
columnName = runtimehrs;
externalType = double;
name = runTimeHrs;
valueClassName = NSNumber;
valueType = d;
},
{
allowsNull = Y;
columnName = scid;
externalType = int;
name = scid;
valueClassName = NSNumber;
valueType = i;
},
{
allowsNull = Y;
columnName = setuptimehrs;
externalType = double;
name = setupTimeHrs;
valueClassName = NSNumber;
valueType = d;
},
{
allowsNull = Y;
columnName = text;
externalType = varchar;
name = text;
valueClassName = NSString;
width = 100;
},
{
allowsNull = Y;
columnName = wcID;
externalType = int;
name = wcID;
valueClassName = NSNumber;
valueType = i;
}
);
attributesUsedForLocking = (pkid);
className = InHouseOperation;
classProperties = (
opNumber,
toWorkCenter,
runTimeHrs,
toMachine,
toWCRate,
text,
setupTimeHrs,
toStockCode
);
externalName = InHouseOperation;
fetchSpecificationDictionary = {};
internalInfo = {
"_clientClassPropertyNames" = (opNumber, text);
"_nameInObjectStore" = Routing;
};
isAbstractEntity = Y;
name = inhouseoperation;
parent = routing;
primaryKeyAttributes = (pkid);
relationships = (
{
destination = machine;
isToMany = N;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = pkid; sourceAttribute =
machineID; });
name = toMachine;
},
{
destination = stockCodes;
isToMany = N;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = pkid; sourceAttribute =
scid; });
name = toStockCode;
},
{
destination = workcenterrate;
isToMany = N;
joinSemantic = EOLeftOuterJoin;
joins = ({destinationAttribute = pkid; sourceAttribute =
rateID; });
name = toWCRate;
},
{
destination = workCenter;
isToMany = N;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = pkid; sourceAttribute =
wcID; });
name = toWorkCenter;
}
);
userInfo = {fetchSpecificationDictionary = {}; };
}
On Jul 18, 2006, at 6:20 PM, Chuck Hill wrote:
John,
Check the model, especially for the abstract entity to ensure that
it is not missing any table or column names. That is a common
source of this problem.
Chuck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden