Permalink
Browse files

Fixed jacl2rights dao compatibility with Oracle ('' equals to null wi…

…th Oracle)
  • Loading branch information...
1 parent 64f4058 commit 6d8fc1bcb4841768150e81e7ce00418fbf650f35 Philippe Villiers committed Mar 16, 2012
Showing with 26 additions and 6 deletions.
  1. +26 −6 lib/jelix-modules/jacl2db/daos/jacl2rights.dao.xml
@@ -15,21 +15,30 @@
<parameter name="groups" />
<conditions >
<eq property="id_aclsbj" expr="$subject" />
- <eq property="id_aclres" expr="''"/>
+ <conditions logic="OR">
+ <eq property="id_aclres" expr="''"/>
+ <isnull property="id_aclres"/>
+ </conditions>
<in property="id_aclgrp" expr="$groups" />
</conditions>
</method>
<method name="getRightsByGroups" type="select">
<parameter name="groups" />
<conditions >
- <eq property="id_aclres" expr="''"/>
+ <conditions logic="OR">
+ <eq property="id_aclres" expr="''"/>
+ <isnull property="id_aclres"/>
+ </conditions>
<in property="id_aclgrp" expr="$groups" />
</conditions>
</method>
<method name="getRightsByGroup" type="select">
<parameter name="group" />
<conditions >
- <eq property="id_aclres" expr="''"/>
+ <conditions logic="OR">
+ <eq property="id_aclres" expr="''"/>
+ <isnull property="id_aclres"/>
+ </conditions>
<eq property="id_aclgrp" expr="$group" />
</conditions>
</method>
@@ -50,6 +59,7 @@
<parameter name="group" />
<conditions >
<neq property="id_aclres" expr="''" />
+ <isnotnull property="id_aclres"/>
<eq property="id_aclgrp" expr="$group" />
</conditions>
<order>
@@ -60,7 +70,10 @@
<parameter name="subject" />
<conditions >
<eq property="id_aclsbj" expr="$subject" />
- <eq property="id_aclres" expr="''"/>
+ <conditions logic="OR">
+ <eq property="id_aclres" expr="''"/>
+ <isnull property="id_aclres"/>
+ </conditions>
<eq property="id_aclgrp" value="__anonymous" />
</conditions>
</method>
@@ -75,7 +88,10 @@
</method>
<method name="getAllAnonymousRights" type="select">
<conditions >
- <eq property="id_aclres" expr="''"/>
+ <conditions logic="OR">
+ <eq property="id_aclres" expr="''"/>
+ <isnull property="id_aclres"/>
+ </conditions>
<eq property="id_aclgrp" value="__anonymous" />
</conditions>
</method>
@@ -105,7 +121,10 @@
<conditions>
<eq property="id_aclgrp" expr="$group" />
<in property="id_aclsbj" expr="$subjects" />
- <eq property="id_aclres" expr="''"/>
+ <conditions logic="OR">
+ <eq property="id_aclres" expr="''"/>
+ <isnull property="id_aclres"/>
+ </conditions>
</conditions>
</method>
<method name="deleteRightsOnResource" type="delete">
@@ -115,6 +134,7 @@
<eq property="id_aclgrp" expr="$group" />
<in property="id_aclsbj" expr="$subjects" />
<neq property="id_aclres" expr="''"/>
+ <isnotnull property="id_aclres"/>
</conditions>
</method>
</factory>

0 comments on commit 6d8fc1b

Please sign in to comment.