Thanks for reply.  Sorry I probably couldn't explain it properly.

>As far as I know, +Need prefix make the filed mandatory,
>i.e. you cannot skip it or give it an empty >value when creating a new
object.

This is also what I've understood, but see my original post where I meant to
show that although I asked picolisp to create and save 2 country database
objects  without any description ("us" with a null string description and
"ar" with description totally missing) and then expected picolisp would have
complained, it actually did not.

So, that's the problem I would expect that picolisp would only allowed "br"
to be saved and have aborted with some error or returned something, not
allowing wrong entries.

Think of this portion or my original example (see original post for the
complete example):

(obj ((+Country) code "br") desc "Brazil")
(commit)

(obj ((+Country) code "us") desc "")
(commit)

(obj ((+Country) code "ar") )
(commit)

as if it were attempts to create countries from data external to my
application (a user entered it or data came from another system).  That's
why description information is missing from the last two attempts, because
it can happen.

So I would expect not to be allowed in some way.

Thanks again,
Regards,
ballona

2008/10/4 Andrei Ivushkin <[EMAIL PROTECTED]>

> (class +Country +Entity)
> (rel code (+Need +Key +String))
> (rel desc (+Need +String))
>
> ..
>
> (obj ((+Country) code "us") desc "")
> (commit)
>
> (obj ((+Country) code "ar") )
> (commit)
>
> As far as I know, +Need prefix make the filed mandatory, i.e. you
> cannot skip it or give it an empty value when creating a new object.
> You can drop +Need prefix for 'desc' field if it is a desired
> behaviour.
> --
> UNSUBSCRIBE: mailto:[EMAIL PROTECTED]
>

------=_Part_23770_11717534.1223153666505
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr"><meta http-equiv="Content-Type" content="text/html; 
charset=utf-8"><meta name="ProgId" content="Word.Document"><meta 
name="Generator" content="Microsoft Word 12"><meta name="Originator" 
content="Microsoft Word 12"><link rel="File-List" 
href="file:///C:%5CDOCUME%7E1%5CBALLTH%7E1.000%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link
 rel="themeData" 
href="file:///C:%5CDOCUME%7E1%5CBALLTH%7E1.000%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link
 rel="colorSchemeMapping" 
href="file:///C:%5CDOCUME%7E1%5CBALLTH%7E1.000%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><style>
&lt;!--
 /* Font Definitions */
 @font-face
        {font-family:&quot;Cambria Math&quot;;
        panose-1:2 4 5 3 5 4 6 3 2 4;
        mso-font-charset:1;
        mso-generic-font-family:roman;
        mso-font-format:other;
        mso-font-pitch:variable;
        mso-font-signature:0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:-1610611985 1073750139 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-unhide:no;
        mso-style-qformat:yes;
        mso-style-parent:&quot;&quot;;
        margin-top:0pt;
        margin-right:0pt;
        margin-bottom:10.0pt;
        margin-left:0pt;
        line-height:115%;
        mso-pagination:widow-orphan;
        font-size:11.0pt;
        font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
        mso-ascii-font-family:Calibri;
        mso-ascii-theme-font:minor-latin;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-hansi-font-family:Calibri;
        mso-hansi-theme-font:minor-latin;
        mso-bidi-font-family:&quot;Times New Roman&quot;;
        mso-bidi-theme-font:minor-bidi;}
MsoChpDefault
        {mso-style-type:export-only;
        mso-default-props:yes;
        mso-ascii-font-family:Calibri;
        mso-ascii-theme-font:minor-latin;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-hansi-font-family:Calibri;
        mso-hansi-theme-font:minor-latin;
        mso-bidi-font-family:&quot;Times New Roman&quot;;
        mso-bidi-theme-font:minor-bidi;}
MsoPapDefault
        {mso-style-type:export-only;
        margin-bottom:10.0pt;
        line-height:115%;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
--&gt;
</style>Thanks for reply.&nbsp; Sorry I probably couldn't explain it 
properly.<br><br>&gt;As far as I know, +Need prefix make the filed 
mandatory,<br>&gt;i.e. you cannot skip it or give it an empty &gt;value when 
creating a new object.<br>
<br>This is also what I've understood, but see my original post where I meant 
to show that although I asked picolisp to create and save 2 country database 
objects&nbsp; without any description ("us" with a null string description and 
"ar" with description totally missing) and then expected picolisp would have 
complained, it actually did not.<br>
<br>So, that's the problem I would expect that picolisp would only allowed "br" 
to be saved and have aborted with some error or returned something, not 
allowing wrong entries.<br><br>Think of this portion or my original example 
(see original post for the complete example):<br>
<br>(obj ((+Country) code &quot;br&quot;) desc 
&quot;Brazil&quot;)<br>(commit)<br><br>(obj ((+Country) code &quot;us&quot;) 
desc &quot;&quot;)<br>(commit)<br><br>(obj ((+Country) code &quot;ar&quot;) 
)<br>(commit)<br><br>
as if it were attempts to create countries from data external to my application 
(a user entered it or data came from another system).&nbsp; That's why 
description information is missing from the last two attempts, because it can 
happen.<br>
<br>So I would expect not to be allowed in some way.<br><br>Thanks 
again,<br>Regards,<br>ballona<br><br><div class="gmail_quote">2008/10/4 Andrei 
Ivushkin <span dir="ltr">&lt;<a href="mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">(class 
+Country +Entity)<br>
(rel code (+Need +Key +String))<br>
(rel desc (+Need +String))<br>
<br>
.<br>
<br>
</div><div class="Ih2E3d">(obj ((+Country) code &quot;us&quot;) desc 
&quot;&quot;)<br>
(commit)<br>
<br>
(obj ((+Country) code &quot;ar&quot;) )<br>
(commit)<br>
<br>
</div>As far as I know, +Need prefix make the filed mandatory, i.e. you<br>
cannot skip it or give it an empty value when creating a new object.<br>
You can drop +Need prefix for &#39;desc&#39; field if it is a desired<br>
behaviour.<br>
<font color="#888888">--<br>
UNSUBSCRIBE: mailto:<a 
href="mailto:picolisp@software-lab.de";>picolisp@software-lab.de</a>?subject=Unsubscribe<br>
</font></blockquote></div><br></div>

------=_Part_23770_11717534.1223153666505--
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to