Wojciech Sobczuk wrote:
> Hello,
>
> When calling (setf (client-email usr) ····@bar.com") on any view class
> instance, I get the following errors:
>
> (setq usr (sql:select 'client :where [= [slot-value 'client 'id] 1]))
> (setf (client-email usr) ····@bar.com")
> (sql:update-records-from-instance usr)
I'm not sure but does the select really return a single instance?
At least in CommonSQL one would have to do (caar (sql:select ...))
ciao,
Jochen
--
http://www.dataheaven.de
It returns a list, but if I (setq usr (make-instance 'client)) I get the
same error. Sorry for the buggy example.
Wojtek
Jochen Schmidt wrote:
> Wojciech Sobczuk wrote:
>
>
>>Hello,
>>
>>When calling (setf (client-email usr) ····@bar.com") on any view class
>>instance, I get the following errors:
>>
>> (setq usr (sql:select 'client :where [= [slot-value 'client 'id] 1]))
>> (setf (client-email usr) ····@bar.com")
>> (sql:update-records-from-instance usr)
>
>
> I'm not sure but does the select really return a single instance?
> At least in CommonSQL one would have to do (caar (sql:select ...))
>
> ciao,
> Jochen
>
> --
> http://www.dataheaven.de
Phew, I've managed to fix it with some friendly help from #lisp'ers on
openprojects.net.
It came out that the line:
(ec-edit instance *default-editing-context* new-value))
looked like:
(ec-edit instance *default-editing-context* ))
in sql/objects.lisp line 342. Can I hope on this fix to be incorporated
into the sources?
Greetings,
Wojtek
Wojciech Sobczuk wrote:
> It returns a list, but if I (setq usr (make-instance 'client)) I get the
> same error. Sorry for the buggy example.
>
> Wojtek
>
> Jochen Schmidt wrote:
>
>> Wojciech Sobczuk wrote:
>>
>>
>>> Hello,
>>>
>>> When calling (setf (client-email usr) ····@bar.com") on any view class
>>> instance, I get the following errors:
>>>
>>> (setq usr (sql:select 'client :where [= [slot-value 'client 'id] 1]))
>>> (setf (client-email usr) ····@bar.com")
>>> (sql:update-records-from-instance usr)
>>
>>
>>
>> I'm not sure but does the select really return a single instance?
>> At least in CommonSQL one would have to do (caar (sql:select ...))
>>
>> ciao,
>> Jochen
>>
>> --
>> http://www.dataheaven.de
>
>