produce whole dn in SQL queries so we don't have to mungle it in code
[virtual-ldap] / sql / organizationalunit.sql
index 24dbfc9..8c07ff9 100644 (file)
@@ -1,12 +1,8 @@
 
 select
-       concat('ou=',categorycode)      as dn,
-       'top
-       organizationalUnit'             as objectClass,
-       categorycode                    as ou,
-       description                     as description,
+       concat('ou=',c.categorycode,',dc=ffzg,dc=hr')   as dn,
+       'organizationalunit'            as objectClass,
+       c.categorycode                  as ou,
+       c.description                   as description
+from categories c
 
-       -- fake objectGUID since we don't have primary key
-       crc32(categorycode)             as objectGUID
-
-from categories