[fdo-dev] fdo insert command

Haris Kurtagic haris at sl-king.com
Wed Oct 18 14:19:37 EDT 2006


 
Perhaps not question for this forum but, I am doing testing with Map and
I am doing a lot of "gymnastic" to figure how MAP is using fdo provider.
 
Is it possible to get debug version of MAP ? ( We are ADN members and AR
)
 
Haris

________________________________

From: Greg Boone [mailto:greg.boone at autodesk.com] 
Sent: Wednesday, October 18, 2006 8:00 PM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] fdo insert command



While it is possible to return an empty reader, such a behavior would
not be compatible with how Map 2007 (2008, etc) functions. If you wish
to have your provider used inside of Map then returning a reader with
populated id values is the correct approach.

 

Greg

 

________________________________

From: Haris Kurtagic [mailto:haris at sl-king.com] 
Sent: Wednesday, October 18, 2006 1:43 PM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] fdo insert command

 

Thank you, if I understood you correctly basically it could be
acceptable to return empty reader and it is up to fdo client application
logic how to behave in those situations..

 

Haris

 

 

 

________________________________

From: Orest Halustchak [mailto:orest.halustchak at autodesk.com] 
Sent: Wednesday, October 18, 2006 4:22 PM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] fdo insert command

Hi Haris,

 

If the provider has no way to get the generated id values, it could
return an empty reader (rather than null reader), but then I'm not sure
what Map would do in the case where the records are displayed in the
data grid. Map expects to get the id values back so that it can populate
the corresponding columns in the data grid and also to know the ids of
the objects so that if they are edited subsequently, the correct objects
get updated in the server. I suppose if a lot of new features are being
added at one time, the user simply could refresh the whole layer in Map
to get updated data complete with id values, but for cases of adding one
or a small number of objects, it's not very efficient to do it that way.

 

I don't think that MapGuide by default uses the insert command unless
someone writes their own scripts that create new features.

 

Orest.

 

________________________________

From: Haris Kurtagic [mailto:haris at sl-king.com] 
Sent: Wednesday, October 18, 2006 3:54 AM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] fdo insert command

Hi Orest,

 

Yes, I understand it is up to provider and RDBMS and app model, but
there could be some other case's of generetaing id's like triggers or
procedure in db or more complex id's (not just number,string)

So I think there could be cases when it is not so straight forward to
get those id's back. 

 

How is this reader (return from insert) used in MapGuide?  Is it used at
all?

Would be appropriate (considering FDO architecture) for provider to
return NULL reader ? 

 

Thank you for Map tip. It works exactly as you wrote ( I suppose Map
anyhow should not try to immediately insert features if some properties
are not nullable).

 

Haris

 

 

 

________________________________

From: Orest Halustchak [mailto:orest.halustchak at autodesk.com] 
Sent: Wednesday, October 18, 2006 1:46 AM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] fdo insert command

Hi Haris,

 

Yes, the reader returned from the insert command should return the id's
of the inserted records. This is particularly needed if the id's are
auto-generated. The actual mechanism of auto-generating new id's is up
to the provider. Oracle would use sequences, other rdbms would use
autonumber or related concepts.

 

Map expects to get this reader from every insert. It uses this
information for example to update the data table and cached information
for newly created features.

 

To avoid having Map try to insert records immediately with null values,
change the Edit menu option for update edits automatically to off (I
don't remember the exact menu item name - I don't have the Map ui in
front of me right now, but I think it's the first item under Edit).
Then, once you finish adding the geometry and setting the properties
that you want, you can check-in the feature or features.

 

Thanks,

Orest.

	-----Original Message-----
	From: Haris Kurtagic [mailto:haris at sl-king.com] 
	Sent: October 17, 2006 6:52 PM
	To: dev at fdo.osgeo.org
	Subject: [fdo-dev] fdo insert command

	Hi,

	 

	I am little confused how FDO Insert Command should work, and
what it should return.

	 

	From documentation I understand it should return reader with
feature id's of new records filled, for single and also for batch
insert. Is this true and necessary? Could be problem for some rdbms ?

	 

	Also I don't quite understand how Map is using insert command
and null values. It seems to me that it is calling Insert command
immediately after creating new geometry without user filling Null values
?

	 

	All this I am testing on foreign schema's (without fdo metadata)

	 

	I hope that I put together understandable questions.

	 

	Haris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-internals/attachments/20061018/674d7283/attachment.html


More information about the Fdo-internals mailing list