openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tan bupt <deerb...@gmail.com>
Subject bug: selectDistinct(List<SelectItem> items) in apache-openjpa-2.0.0-SNAPSHOT
Date Wed, 25 Feb 2009 04:38:49 GMT
I think it is a bug in
org.apache.openjpa.persistence.query.QueryDefinitionImpl, can we fix it?

 public QueryDefinition selectDistinct(SelectItem... items) {
  return select(items == null ? null : Arrays.asList(items), true);
 }
 public QueryDefinition selectDistinct(List<SelectItem> items) {
  return select(items, false);
 }

 private QueryDefinition select(List<SelectItem> items, boolean isDistinct)
{
  if (_projections == null) {
   _projections = new ArrayList<SelectItem>();
  } else {
   _projections.clear();
  }
  _distinct = isDistinct;
  for (SelectItem item : items)
   _projections.add(item);
  return this;
 }

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message