1 Reply Latest reply on Jul 17, 2006 1:28 PM by stephan opitz

    EJB 30 - SOME KIND OF LEFT JOIN HELP

    stephan opitz Newbie

      i have two tables

      CREATE TABLE categories (
      categories_id BIGINT(20) NOT NULL,
      image VARCHAR(45) NOT NULL,
      parent_categories_id BIGINT(20) NOT NULL,
      sort_order INTEGER(3) NOT NULL,
      last_modified DATETIME NOT NULL,
      timestamp DATETIME NOT NULL,
      PRIMARY KEY(categories_id)
      );

      CREATE TABLE categories_lang (
      categories_id BIGINT(20) NOT NULL,
      languages_id BIGINT(20) NOT NULL,
      name VARCHAR(45) NOT NULL,
      description TEXT NOT NULL,
      PRIMARY KEY(categories_id, languages_id)
      );

      i created the ejb 3.0 -> all fine

      but i don't know how i make i set or sth like this to get an specific categorieslang set when i ask for a special categorie?

      what i have to add to categories ejb?

      the categories lang should depend on the categories_id and the language id, which i have before ask for categories. actual i make another query to get the categories lang, but i want only one query where i get a categorie with a specific lang :-/

      a have no solution found yet, because it is not an classic one...., connection...

      thx stephan