3 Replies Latest reply on Mar 12, 2009 1:11 PM by jess singh

    How to write search for "None" associations using seam & hibernate

    jess singh Newbie

      I am a seam newbie and writing a simple storyboard app. My model looks like a story can have one or zero assignee. What I want to do is search for stories that have no assignees but dont know an elegant way to do that - the any part works fine its - the --None-- at the bottom I need help with - once I have the user's input from icefaces I know I need to add isNull(assignee) to my criteria hibernate object.

      <h:selectOneMenu id="Story_assignee" value="#{story.assignee}" required="false">
                      <s:selectItems value="#{teamMemberList}" var="itemIter"
                              noSelectionLabel="Any..." />
                      <s:convertEntity />
                      <f:selectItem itemLabel="--None--" _itemValue=""_/>

      Does anyone know of any sample/apps that already do this - I think its a very common use case.