Jake Conk | 2 Nov 2007 07:51
Picon

Setting output dir relative of directory I am in?

Hello,

I installed the propel runtime and propel generator using pear so they
are located in my /usr/share/php5/PEAR directory and my conf dir for
my project is located somewhere in my project
(/srv/www/htdocs/projects/myproject/datasource/conf).

Now when I'm in my conf dir and try to run propel-gen it tries to
build my files in /usr/share/php5/PEAR/datasource and I have my
projects propel.output.dir set to "../../datasource" which means I
want it to build in the current directory I am in but apparently its
trying to build in the location of the where it's sources are at.

Is there a variable that I could use that holds the current working
directory that I am in? I don't want to hard code this path because
other people have this project checked out from svn as well and have
the project located in different directories on their system.

Thanks,
- Jake
Jake Conk | 2 Nov 2007 08:10
Picon

Re: Setting output dir relative of directory I am in?

Nevermind, found it :)

application.startdir

- Jake

On 11/1/07, Jake Conk <jake.conk <at> gmail.com> wrote:
> Hello,
>
> I installed the propel runtime and propel generator using pear so they
> are located in my /usr/share/php5/PEAR directory and my conf dir for
> my project is located somewhere in my project
> (/srv/www/htdocs/projects/myproject/datasource/conf).
>
> Now when I'm in my conf dir and try to run propel-gen it tries to
> build my files in /usr/share/php5/PEAR/datasource and I have my
> projects propel.output.dir set to "../../datasource" which means I
> want it to build in the current directory I am in but apparently its
> trying to build in the location of the where it's sources are at.
>
> Is there a variable that I could use that holds the current working
> directory that I am in? I don't want to hard code this path because
> other people have this project checked out from svn as well and have
> the project located in different directories on their system.
>
> Thanks,
> - Jake
>
Christopher Vogt | 2 Nov 2007 18:45

Bug? Different return value for getAssocBookAuthors() depending on direction

Hej,

I found a strange behaviour and found it quite hard to debug.

Help appreciated, it might well be that it is a bug in propel.

See http://hashbin.com/1346d.html

Cheers

Chris
Jake Conk | 2 Nov 2007 19:16
Picon

Changing output directory?

Hello,

I notice propel always creates your classes in a directory that has
the same name of your project. Is there a way to change it so it just
creates the classes in the directory you specified instead of creating
a directory with your project name and putting them in their?

Thanks,
- Jake
Hans Lellelid | 2 Nov 2007 19:30

Re: Changing output directory?

Jake Conk wrote:
> Hello,
> 
> I notice propel always creates your classes in a directory that has
> the same name of your project. Is there a way to change it so it just
> creates the classes in the directory you specified instead of creating
> a directory with your project name and putting them in their?

Someone just asked this on the list a couple days ago.  I don't remember
the final answer off the top of my head.  I suggested trying

propel.targetPackage=

(i.e. leaving it blank)

Take a look at "RE: Generated Peer classes" subject from 10/23.  I
thought there was a better follow up, though.  Maybe Anthony (original
poster) can point you in the right direction.

Hans
Jake Conk | 2 Nov 2007 19:51
Picon

Constant Defined Twice Error

Hello,

I am getting an error trying to use my table I generated with propel.
When I try to use the FtpUserPeer class it tells me I have the
constant defined twice in BaseFtpUserPeer.php which is true when I
look in that file. How would I fix this?

Here is my table code from the schema file:

		<table name="ftpuser" phpName="FtpUser" description="FTP User">
			<column name="id" type="integer" primaryKey="true" autoIncrement="true" />
			<column name="userid" type="varchar" size="32" required="true"
phpName="UserId" />
			<column name="passwd" type="varchar" size="32" required="true"
phpName="Password" />
			<column name="uid" type="smallint" default="5500" required="true" />
			<column name="gid" type="smallint" default="5500" required="true" />
			<column name="homedir" type="varchar" size="255" required="true" />
			<column name="shell" type="varchar" size="16"
default="/sbin/nologin" required="true" />
			<column name="count" type="integer" default="0" required="true" />
			<column name="accessed" type="varchar" size="19"
default="0000-00-00 00:00:00" required="true" />
			<column name="modified" type="varchar" size="19"
default="0000-00-00 00:00:00" required="true" />
			
			<!-- Foreign Key References -->
			<foreign-key foreignTable="ftpgroup">
				<reference local="gid" foreign="gid" />
			</foreign-key>
(Continue reading)

Hans Lellelid | 2 Nov 2007 20:31

Re: Constant Defined Twice Error

Hi Jake,

You're right;  Well, we probably should change that in the base class to
be more Propel-specific (want to open a ticket for that?)  but the quick
short-term fix for you would be to give a different constant name to
that column -- using the peerName attribute:

<column name="count" peerName="_COUNT"  (or "COUNTCOL" or whatever you want)

Hope that helps.

Hans

Jake Conk wrote:
> Hello,
> 
> I am getting an error trying to use my table I generated with propel.
> When I try to use the FtpUserPeer class it tells me I have the
> constant defined twice in BaseFtpUserPeer.php which is true when I
> look in that file. How would I fix this?
> 
> Here is my table code from the schema file:
> 
> 		<table name="ftpuser" phpName="FtpUser" description="FTP User">
> 			<column name="id" type="integer" primaryKey="true" autoIncrement="true" />
> 			<column name="userid" type="varchar" size="32" required="true"
> phpName="UserId" />
> 			<column name="passwd" type="varchar" size="32" required="true"
> phpName="Password" />
> 			<column name="uid" type="smallint" default="5500" required="true" />
(Continue reading)

Jake Conk | 3 Nov 2007 02:11
Picon

Re: Constant Defined Twice Error

Thanks for the solution Hans. I tried submitting a ticket for it but I
keep getting this error, "Submission rejected as potential spam". I
tried modifying the message a bit and still got it...  Can you try
submitting the ticket please?

Thanks,
- Jake

On 11/2/07, Hans Lellelid <hans <at> velum.net> wrote:
> Hi Jake,
>
> You're right;  Well, we probably should change that in the base class to
> be more Propel-specific (want to open a ticket for that?)  but the quick
> short-term fix for you would be to give a different constant name to
> that column -- using the peerName attribute:
>
> <column name="count" peerName="_COUNT"  (or "COUNTCOL" or whatever you want)
>
> Hope that helps.
>
> Hans
>
> Jake Conk wrote:
> > Hello,
> >
> > I am getting an error trying to use my table I generated with propel.
> > When I try to use the FtpUserPeer class it tells me I have the
> > constant defined twice in BaseFtpUserPeer.php which is true when I
> > look in that file. How would I fix this?
> >
(Continue reading)

Hans Lellelid | 3 Nov 2007 10:09

Re: Constant Defined Twice Error

Yes, I'll do that -- & thanks for trying.  Cameron is working on a new
filtering system that will hopefully be less frustrating for people.  I
hate it, but the alternative is a whole lot of spam.

Thanks,
Hans

Jake Conk wrote:
> Thanks for the solution Hans. I tried submitting a ticket for it but I
> keep getting this error, "Submission rejected as potential spam". I
> tried modifying the message a bit and still got it...  Can you try
> submitting the ticket please?
>
> Thanks,
> - Jake
>
> On 11/2/07, Hans Lellelid <hans <at> velum.net> wrote:
>   
>> Hi Jake,
>>
>> You're right;  Well, we probably should change that in the base class to
>> be more Propel-specific (want to open a ticket for that?)  but the quick
>> short-term fix for you would be to give a different constant name to
>> that column -- using the peerName attribute:
>>
>> <column name="count" peerName="_COUNT"  (or "COUNTCOL" or whatever you want)
>>
>> Hope that helps.
>>
>> Hans
(Continue reading)

Simon Roby | 3 Nov 2007 18:44
Picon

Re: Constant Defined Twice Error

I recently found that posting on the trac works better if you go to
the Settings page and enter a name and email then press Apply changes.
While not being a real trac account it appears that the spam filter is
nicer to you if you take the time to save your name and email in the
session.
-- 
- SR

On Nov 3, 2007 5:09 AM, Hans Lellelid <hans <at> velum.net> wrote:
> Yes, I'll do that -- & thanks for trying.  Cameron is working on a new
> filtering system that will hopefully be less frustrating for people.  I
> hate it, but the alternative is a whole lot of spam.
>
> Thanks,
> Hans
>
>
> Jake Conk wrote:
> > Thanks for the solution Hans. I tried submitting a ticket for it but I
> > keep getting this error, "Submission rejected as potential spam". I
> > tried modifying the message a bit and still got it...  Can you try
> > submitting the ticket please?
> >
> > Thanks,
> > - Jake
> >
> > On 11/2/07, Hans Lellelid <hans <at> velum.net> wrote:
> >
> >> Hi Jake,
> >>
(Continue reading)


Gmane