Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-133

Complete implementation for schema support.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-ALPHA2
    • Fix Version/s: 2.0-BETA4
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Activity

      Hide
      Scott Morken added a comment -

      Since I was trying to break the schemaname.tablename by overcomplicating it and not doing a very good search here first (DDC-639, sorry Roman!), I happened to notice that the quoteIdentifier method in AbstractPlatform doesn't appear to be correctly quoting the schema and table name if quotes are needed. I'm not using any quoting but just glancing at the code, shouldn't $str be exploded on '.' in case of a schema.tablename string passed in? The current method looks like it will return (quote)schemaname.tablename(quote) instead of (quote)schemaname(quote).(quote)tablename(quote).
      Maybe something along the lines of:

      $expStr = explode('.', $str);
      return $c . join("$c.$c", $expStr) . $c;
      

      Awesome piece of work! It rocks!!

      Show
      Scott Morken added a comment - Since I was trying to break the schemaname.tablename by overcomplicating it and not doing a very good search here first ( DDC-639 , sorry Roman!), I happened to notice that the quoteIdentifier method in AbstractPlatform doesn't appear to be correctly quoting the schema and table name if quotes are needed. I'm not using any quoting but just glancing at the code, shouldn't $str be exploded on '.' in case of a schema.tablename string passed in? The current method looks like it will return (quote)schemaname.tablename(quote) instead of (quote)schemaname(quote).(quote)tablename(quote). Maybe something along the lines of: $expStr = explode('.', $str); return $c . join( "$c.$c" , $expStr) . $c; Awesome piece of work! It rocks!!
      Hide
      Jonathan H. Wage added a comment -

      The only problem I can think of is the identifier quoting like Scott mentions above. I had to "hack" this same thing in Doctrine 1. I don't like it

      Show
      Jonathan H. Wage added a comment - The only problem I can think of is the identifier quoting like Scott mentions above. I had to "hack" this same thing in Doctrine 1. I don't like it
      Hide
      Roman S. Borschel added a comment - - edited

      I think the limitation of not supporting identifier quoting in cases like this is not problematic so this hack is not needed. Identifier quoting is not supported everywhere anyway (i.e. not for join columns and discriminator columns).

      Show
      Roman S. Borschel added a comment - - edited I think the limitation of not supporting identifier quoting in cases like this is not problematic so this hack is not needed. Identifier quoting is not supported everywhere anyway (i.e. not for join columns and discriminator columns).
      Hide
      Roman S. Borschel added a comment -

      Pushing back to beta4 to wait for more potential feedback. If anyone has issues with the current support for schemas via the table name, please speak up.

      Show
      Roman S. Borschel added a comment - Pushing back to beta4 to wait for more potential feedback. If anyone has issues with the current support for schemas via the table name, please speak up.
      Hide
      Roman S. Borschel added a comment -

      Closing this case for now as no further negative feedback was submitted. If new major issues arise that can not be addressed easily this issue needs to be reconsidered in a post 2.0 release.

      Show
      Roman S. Borschel added a comment - Closing this case for now as no further negative feedback was submitted. If new major issues arise that can not be addressed easily this issue needs to be reconsidered in a post 2.0 release.

        People

        • Assignee:
          Benjamin Eberlei
          Reporter:
          Roman S. Borschel
        • Votes:
          2 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: