[seam-dev] Seam 2.1.1.CR2

Gavin King gavin at hibernate.org
Thu Dec 4 14:09:32 EST 2008


So you never use outer joins? Every outer join produces null values.

On Thu, Dec 4, 2008 at 1:04 PM, Francisco Jose Peredo
<franciscoperedo at tabasco.gob.mx> wrote:
> I try to avoid it in databases, if there are 3 different possible
> values, it is better to use a not null Integer column, all my boolean
> columns are "not null" always.
>
> Emmanuel Bernard escribió:
>> Databases use this three-state for decades. It seems to work fine.
> Many people believe it does not work fine:
> http://en.wikipedia.org/wiki/Null_(SQL)#Controversy
>>
>> On  Dec 4, 2008, at 19:43, Francisco Jose Peredo wrote:
>>
>>> Hi!
>>>
>>> Pete Muir escribió:
>>>>
>>>> On 4 Dec 2008, at 16:57, Francisco Jose Peredo wrote:
>>>>
>>>>> Hi!
>>>>>
>>>>> Great job Dan!
>>>>>
>>>>> You missed
>>>>> http://www.seamframework.org/Community/PossibleBugInOrgjbossseamcoreValidators
>>>>>
>>>>>
>>>>> ;-)
>>>>
>>>> -> JIRA as Dan and I said
>>> Fine, I'll JIRA.
>>>>
>>>>>
>>>>>
>>>>> Oh, and what is you opinon on:
>>>>>
>>>>> http://www.seamframework.org/Community/IfAMethodReturnsBooleanItShouldntReturnNullGoodOrBadPractice
>>>>>
>>>>>
>>>>> ?
>>>>
>>>> I think its fine, null == undefined which is valid state for something
>>>> to be in.
>>> Yes, but I have always felt uneasy about a null boolean thing... the
>>> point of boolean is to restrict the possible outcomes of something to
>>> "true" or "false", but with a nullable boolean we now have 3 possible
>>> outcomes "true", "false" and "undefined"... and the problem is that
>>> "undefined" is also "typeless" and therefore bug prone, the code:
>>>
>>> if(isUserInRole("administrator)){
>>> //do something
>>> }
>>> else {
>>> //do something else
>>> }
>>>
>>> looks like something perfectly valid, but it turns out it can crash
>>> because isUserInRole can return null.
>>>
>>> I mean I can understand it for MailComponent.getBoolean,  and
>>> org.jboss.seam.ui.util.JSF.getBooleanValue, but I don't like it for
>>> org.jboss.seam.ui.graphicImage.Image.isRatio or
>>> org.jboss.seam.web.IsUserInRole.isUserInRole.
>>>
>>> Wouldn't it be better to use an Enum if there are 3 or more possible
>>> outcomes?
>>>
>>> Regards,
>>> Francisco
>>>>
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Francisco
>>>>>
>>>
>>> _______________________________________________
>>> seam-dev mailing list
>>> seam-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>
>>
>
>
> --
> Dirección Informática de Servicios Financieros
> Dirección General de Modernización e Innovación Gubernamental
> Secretaría de Administración y Finanzas
> Paseo de la Sierra 435 col. Reforma
> C.P. 86086, Villahermosa, Tabasco.
> Tel. 52 + 993 + 310 40 00 Ext. 7127
> http://saf.tabasco.gob.mx/
>
> IMPORTANTE: Esta transmisión electrónica, incluyendo sus anexos, archivos insertados o "attachments", puede constituir información confidencial o reservada, en los términos de la Ley de Acceso a la Información Pública del Estado de Tabasco, y estar protegida por el derecho fundamental a la privacidad. Se prohibe el uso de esta información por cualquier persona distinta al receptor intencional o previsto. Si usted ha recibibido esta transmisión electrónica por error, por favor responda inmediatamente al emisor y borre esta información de su sistema. El uso, diseminación, distribución o reproducción de esta transmisión electrónica por receptores no intencionados o no previstos por el emisor, no está autorizada y puede considerarse ilícita en los términos de la legislación penal y civil vigente.
>
> _______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev
>



-- 
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org




More information about the seam-dev mailing list