最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

sdk - What does the SaveHeader of KBObject do? - Stack Overflow

programmeradmin1浏览0评论

I'm writing some code in the GeneXus SDK to import XMLs into KBObjects. To avoid circular references, I'm saving all headers first and then the objects.

What exactly does SaveHeader do? What are the implications of calling SaveHeader without saving the full KBObject?

I'm writing some code in the GeneXus SDK to import XMLs into KBObjects. To avoid circular references, I'm saving all headers first and then the objects.

What exactly does SaveHeader do? What are the implications of calling SaveHeader without saving the full KBObject?

Share asked yesterday EKaferEKafer 31 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

The SaveHeader method performs a partial save of a KBObject, primarily storing its header information and properties, while leaving the full object uncommited. This allows the object to be referenced by other objects during the import process, without fully saving the object itself.

By saving only the header initially, you can avoid circular references and maintain the integrity of the objects being processed. However, it's important to ensure that you address and finalize these saved headers later. Failing to do so may result in orphaned or incomplete objects in your knowledge base.

As an alternative, you might want to consider creating a standard export file (xpz) and utilizing the import APIs. This approach can provide a more streamlined and reliable way of importing objects into your knowledge base, particularly if you're dealing with complex relationships or a large number of objects. The import process using xpz files ensures that objects are saved and linked correctly, potentially avoiding the need to manage headers manually.

发布评论

评论列表(0)

  1. 暂无评论