Still no problem at all using the latest doctrine 1.1 branch + the
latest symfony 1.2 branch. But because of the trouble man have if he
wants to install a plugin which only runs under doctrine 1.1, i wanted
to revert the orm layer version to 1.0. There i encountered another
issue that has obviously been fixed in the latest doctrine 1.1 branch.
My schema:

sfAbstractFile:
  tableName: sf_abstract_files
  columns:
    filename:                   { type: string(255), notnull: true }
    hash:                       { type: string(255), notnull: true }
    comment:                    { type: string, notnull: false }
    title:                      { type: string(255),  notnull: false }
    environment:                { type: string(255), notnull: false }
    application:                { type: string(255), notnull: false }
    tags:                       { type: string(255), notnull: false }

  actAs:
    NestedSet:
      hasManyRoots:   true,
      rootColumnName: root_id

  relations:
    rootNode:
      class:        sfFilebaseDirectory
      local:        root_id
      foreign:      id
      onDelete:     cascade
      onUpdate:     cascade
      foreignAlias: descendants

sfFilebaseFile:
... a few instances that inherit from sfAbstractFile

With doctrine 1.1 everything works nice, but in doctrine 1.0 the
explicit definition of the first foreign key relationship to the same
table/relation (through sfAbstractFile.root_id and sfAbstractFile.id
(the PK) you are not able to generate your sql. Models, forms etc.
work fine, but sql generation raises an error.

I would be really happy and thankful if one could tell me WHY it is
not recommended to use the 1.1 branch with symfony 1.2 and which
migritation problems are there. Perhaps man could help and do some
slavery work? ;)

Thank you in advance,
de joshi

On May 19, 1:53 pm, Johannes Heinen <johannes.hei...@googlemail.com>
wrote:
> :D ok, i have an idea: it *may* be that it works because i store
> doctrine 1.1 in ./lib/ventor/doctrine, but there is also the origin
> sfFilebasePlugin under ./lib/vendor/symfony/plugins/
> sfDoctrinePlugin/...
>
> So it is probable that the generator uses the old doctrine 1.0 tasks
> and the runtime the doctrine 1.1 libraries. I prefer to say "never
> change a running system"
>
> On May 19, 1:49 pm, Johannes Heinen <johannes.hei...@googlemail.com>
> wrote:
>
> > In this (my) special case it seems to work - but i did not even touch
> > the most complex doctrine possibilities.
>
> > In my test environment i installed doctrine 1.1 - by following the
> > guide - from svn.
>
> > But it seems also possible to define it as an dependency in
> > package.xml to ship it with a plugin - regarding the
> > advice to change the ProjectConfiguration.php
>
> > I use 3 Tables with relationships and column aggregation inheritance.
> > I do not use any behaviours at this time, so
> > i cannot say anything about that.
>
> > I use the preSave() trigger to save a directory- or filename and
> > synchronizing existing files in my architectures file
> > system according to the model changes - using getModified(true), this
> > seems to work nicely.
>
> > I discovered no autoloading issues yet as it is proclaimed in one of
> > the blog's comments.
>
> > Let's see... i'll play around with it a while.
>
> > On May 19, 10:59 am, "David Ashwood" <da...@inspiredthinking.co.uk>
> > wrote:
>
> > > There was some chatter about a month ago about some issues running 
> > > Doctrine
> > > 1.1 with sf 1.2 (I can't find the topic at the mo and I can remember what
> > > the issues were).
> > > In the url you posted there should be a link to a trac ticket - which 
> > > you'll
> > > need to checkout for some additional changes you'll need to implement.
>
> > > jw probably has a better idea of the issues than anybody - so he might 
> > > chip
> > > in with some tips if he has the time.
>
> > > -----Original Message-----
> > > From: symfony-users@googlegroups.com 
> > > [mailto:symfony-us...@googlegroups.com]
>
> > > On Behalf Of Johannes Heinen
> > > Sent: 19 May 2009 10:40
> > > To: symfony users
> > > Subject: [symfony-users] Re: sfDoctrinePlugin/sf1.2
>
> > > Hey again,
>
> > > i've found this link: 2 lines to migrate the new doctrine 1.1 version
> > > into the sf 1.2 release. Perhaps somebody considers it helpful.
>
> > >http://www.symfony-project.org/blog/2009/01/12/call-the-expert-using-...
> > > m-version-of-doctrine
>
> > > So my previous comment seems to be obsolete (as most times^^ ;)). I'll
> > > try it out and write a line on how it worked.
>
> > > Thanks :)
>
> > > On May 19, 10:31 am, Johannes Heinen <johannes.hei...@googlemail.com>
> > > wrote:
> > > > hey:)
> > > > Sorry for the confusion: I've found out that the doctrine plugin
> > > > shipped with symfony 1.2 is based on the 1.0 release of doctrine - as
> > > > you already said it - i had read this small, but important notice
> > > > recently in the doctrine 1.1 release
> > > notes:http://www.doctrine-project.org/blog/doctrine-1-1-released.
>
> > > > And you are right: This release does not log the changes made on a
> > > > Doctrine_Record instance yet :( So my provided solution *will not
> > > > work* for the current symfony release.
>
> > > > Hopefully the new doctrine release will be patched into the sf 1.2
> > > > plugin, but as you can read in the doctrine's release notes: it seems
> > > > even not to be clear if the new version will be shipped with the sf
> > > > 1.3 final. :(
>
> > > > Damn, but I need this stuff ^^
>
> > > > Thanks,
> > > > Joshi
>
> > > > On May 19, 9:53 am, "David Ashwood" <da...@inspiredthinking.co.uk>
> > > > wrote:
>
> > > > > It exists also in the 1.0 version Doctrine that comes with Symfony 1.2
> > > :)
> > > > > Watch out though - It'll only work with the current record - with
> > > Doctrine
> > > > > 1.1 you can also optionally check child records.
>
> > > > > -----Original Message-----
> > > > > From: symfony-users@googlegroups.com
> > > [mailto:symfony-us...@googlegroups.com]
>
> > > > > On Behalf Of Johannes Heinen
> > > > > Sent: 19 May 2009 00:17
> > > > > To: symfony users
> > > > > Subject: [symfony-users] Re: sfDoctrinePlugin/sf1.2
>
> > > > > whoho, got it. For the ones who want to know:
>
> > > > >http://www.doctrine-project.org/documentation/manual/1_1/en/component...
> > > > > ew
>
> > > > > getModified(true) is the keyword.
>
> > > > > thanks.
>
> > > > > On 18 Mai, 18:17, Johannes Heinen <johannes.hei...@googlemail.com>
> > > > > wrote:
> > > > > > HI all,
>
> > > > > > is there a way to revert changes made to an doctrine object during a
> > > > > > transaction?
>
> > > > > > I user the preSave() Hook to do some stuff and set attributes
> > > > > > depending on their original values. I don't see any way to retrieve
> > > > > > these original values, i'd only found methods to retrieve 
> > > > > > information
> > > > > > about which columns have changed.
>
> > > > > > Is there a method like (getOriginalValueForField('myField')) ?
>
> > > > > > Thanks,
> > > > > > Johannes
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to