Opened 15 years ago
Closed 15 years ago
#65 closed task (fixed)
get-item-by-id returns an empty object of TopicC instead of nil
Reported by: | lgiessmann | Owned by: | lgiessmann |
---|---|---|---|
Priority: | critical | Milestone: | miscellaneous 2010 |
Component: | data-model | Version: | 0.1 |
Keywords: | Cc: |
Description
scenario:
;> cd isidorus/svn/trunk/src
;> #start emacs + slime
(asdf:operate 'asdf:load-op 'isidorus)
(xml-importer::setup-repository "unit_tests/poems.xtm" "data_base" :tm-id "http://isidorus/tmra2009" :xtm-id "tmra2009")
(d:get-item-by-id "goethe") ; --> returns the correct TopicC-object
;> restart slime
(asdf:operate 'asdf:load-op 'isidorus)
(d:get-item-by-id "goethe") ; --> returns #<TOPICC oid:oethe>, an empty object of the type TopicC
Change History (3)
comment:1 Changed 15 years ago by
Status: | new → accepted |
---|
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
replaced make-instance :from oid by elephant::controller-recreate-instance
Note: See
TracTickets for help on using
tickets.
(defun get-item-by-id (topicid &key (xtm-id *current-xtm*) (revision 0) (error-if-nil nil))
is chosen. If xtm-id is nil, choose the global TM with its internal ID, if
applicable in the correct revision. If revison is provided, then the code checks
if the topic already existed in this revision and returns nil otherwise.
If no item meeting the constraints was found, then the return value is either
NIL or an error is thrown, depending on error-if-nil."
(make-instance 'TopicC :from-oid (subseq topicid 1))
this line creates always a TopicC objec event if there is not topic related to the given oid.