0 Replies Latest reply on Jan 16, 2007 3:39 PM by Leo Baschy

    extending EntityQuery by override or by constructor ?

    Leo Baschy Novice

      I've seen both kind of code:

      public class PotatoQuery extends EntityQuery {
      public PotatoQuery() {
       setEjbql("SELECT potato FROM Potato potato");

      as well as

      public String getEjbql() {
       return "SELECT potato FROM Potato potato";

      Are both equally valid? Fyi, override example is from recent seam-gen.

      Now it seems e.g. for setOrder one would want to use the constructor, because it may change.