Hi -
So, I added to a UPDM asset package an annotation class that has a relationship as follows:
Origin class: PipelineJunction
Origin Primary Key: OBJECTID (ObjectID)
Destination class: SVT_Order_Anno
Destination Foreign Key: FeatureID (Long)
Running "Apply Asset Package" results in the error in the subject (when I remove the relationship the GP tool works without error).
I *thought* an ObjectID had a data type of "Long" - but apparently not. Any suggestions on how to resolve this would be much appreciated.
Thx,
Ed
Solved! Go to Solution.
You can’t use OBJECTID for this, even though it looks like a Long.
In Utility Network / UPDM asset packages, relationships cannot use OBJECTID as the primary key. While OBJECTID is internally stored as a 32-bit integer, it is system-managed, non-stable, and not a true user key, so the asset package validator rejects it.
How to fix it:
Add a user-managed Long or GlobalID field on PipelineJunction
Populate it (or use GlobalID / GUID)
Point SVT_Order_Anno.FeatureID to that field instead
Re-run Apply Asset Package
OBJECTID may be numeric, but it’s not valid for relationship classes in asset packages. Use a stable user field (preferably GlobalID).
You can’t use OBJECTID for this, even though it looks like a Long.
In Utility Network / UPDM asset packages, relationships cannot use OBJECTID as the primary key. While OBJECTID is internally stored as a 32-bit integer, it is system-managed, non-stable, and not a true user key, so the asset package validator rejects it.
How to fix it:
Add a user-managed Long or GlobalID field on PipelineJunction
Populate it (or use GlobalID / GUID)
Point SVT_Order_Anno.FeatureID to that field instead
Re-run Apply Asset Package
OBJECTID may be numeric, but it’s not valid for relationship classes in asset packages. Use a stable user field (preferably GlobalID).
Ok. Thanks. Will give the GlobalID a try. Fingers crossed.
Ed
Worked as described. Thanks!
Also found that anno expressions don't seems to work in JScript -- but they do in Arcade, so am going to make life simple(r) and stick with Arcade.
Ed
@EdwardBlair you'll want to migration the feature linked annotation class to use global ids.