Re: number to id

Helge Hess <[email protected]>
Newsgroups gmane.comp.cms.opengroupware.xmlrpc.devel
Message-ID <[email protected]>
On 24. Mai 2005, at 11:46 Uhr, Christoph Guse wrote:
> in my project I use enterprise.insert to insert a new Enterprise.  
> This works fine and as result I get the unique number of the  
> enterprise. The number is an integer and it is correct, but in my  
> case it is necessary to get a full ID, i.e. "skyrix://renner.flex/ 
> renner/33710" .

Why is this necessary? All xmlrpcd actions should work fine with just  
the primary key (they treat them as a relative URL to "skyrix:// 
renner.flex/renner").

> I tried to use system.getHostName to construct the ID by myself,  
> but the result of system.getHostName is "renner.flex".

The id is _not_ the hostname, thats just the default (you need to  
change it if you are running multiple instances on one machine). The  
instance ID is set using the "skyrix_id" default.

> Is the part "skyrix://" in every installation the same?

Currently yes. It might change in future versions (to ogo:// or sth  
like this ...)

> Is the part "/renner/" always the first part of system.getHostName?

No.

> Is there any way to get the full ID automatically with  
> enterprise.insert?

No. You would need to fetch it.

Maybe it makes sense to add an action which returns the instance ID,  
though I fail to see what _you_ need it for.

Greets,
   Helge
-- 
http://docs.opengroupware.org/Members/helge/
OpenGroupware.org

-- 
OpenGroupware.org XML-RPC
[email protected]
http://mail.opengroupware.org/mailman/listinfo/xmlrpc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.