I am editing a Postgis table using the OSGeo FDO Provider for PostgreSQL/PostGIS in AutoCAD Map 3D 2012. As i have noticed that the serial type of the ID field does not give an automatic value to de ID field after inserting a new feature in the layer and after checking in (AutoCAD Map seems not to understand de nextval(sequence_name) function in the DEFAULT property of the ID field(thats how the autonumeric numbers work in PostgreSQL)), i am using a database side trigger which gives the next sequence value to the ID field of the new record. The trigger is launched BEFORE inserting a new record.
The problem is that after executing the trigger, in AutoCAD Map all the fields are still shown as null, and they are not displayed until i manually refresh the layer.
Is there any way to auto-refresh the layer after checking in a new feature?
As some confirmation, the same happens a lot working with Oracle (so to me it seems generic anyway). Sometimes nothing gets refreshed, other times I have to perform the refresh manually.
On the other hand, with the ID creation in your database (via your trigger), are you able to checkin more then one NEW feature at the same time? Is your ID field the primary key for your datalayer?
MAP is to my experience not able to know which feature is what when refreshing as it does not have a key value before the checking. This will make the chekin/refresh operation to fail.
If your Primary key value for new features is generated outside map (via a trigger in teh databse), you can only create and checkin one feature at the time.
You are right, i only managed to save one NEW feature at the same time, when i check-in.Thats why i finally decided to activate the "Automatic Update" option in the Feature Edit Panel. Now it checks-in automatically when i draw a new feature, and the trigger generates the ID properly, even if i copy 100 features at a time.
The problem is that i don´t see the auto-generated ID until i refresh the layer and i need some automatic refresh at least after every 15 minutes or something to avoid manually refreshing the layer after each drawing to see the "real" data.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.