Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DHFPROD-1643- Do a case insensitive equality check for entity name when creating an… #1869

Merged
merged 1 commit into from
Feb 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,28 @@ declare function flow:get-flow-nocache(
{

hul:run-in-modules(function() {
/hub:flow[
hub:entity = $entity-name and
let $flow := /hub:flow[
fn:lower-case(hub:entity) = fn:lower-case($entity-name) and
hub:name = $flow-name]
[
[
if (fn:exists($flow-type)) then
hub:type = $flow-type
else
fn:true()
]
return
if ((fn:count($flow)) > 1) then
/hub:flow[
hub:entity = $entity-name and
hub:name = $flow-name]
[
if (fn:exists($flow-type)) then
hub:type = $flow-type
else
fn:true()
]
]
else
$flow
}) ! hul:deep-copy(.)
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ declare function hent:get-model($entity-name as xs:string)

declare function hent:get-model($entity-name as xs:string, $used-models as xs:string*)
{
let $model := fn:collection($ENTITY-MODEL-COLLECTION)[info/title = $entity-name]
let $model :=
let $_ := fn:collection($ENTITY-MODEL-COLLECTION)[lower-case(info/title) = lower-case($entity-name)]
return
if (fn:count($_) > 1) then
fn:collection($ENTITY-MODEL-COLLECTION)[info/title = $entity-name]
else
$_
where fn:exists($model)
return
let $model-map as map:map? := $model
Expand Down