ufront / ufront-orm

The Object Relational Mapper, allows easy, type-safe access to your database. Builds on Haxe's SPOD but adds macro powered relationships, validation and client side usage
MIT License
13 stars 4 forks source link

double quotes on php target manymany #7

Closed milkmangames closed 9 years ago

milkmangames commented 9 years ago

I'm new to all of this, but seem to have found an issue with the php target. I could only guess at how to create the _join_x_y table for manymany so perhaps i guessed wrong and that's the problem, but:

this line inManyToMany: bList = bManager.unsafeObjects("SELECT * FROM " + bManager.table_name + " WHERE " + Manager.quoteList("id", bListIDs), false);

was throwing an exception due to double quotes (at least on php, bManager,table_name returns a name that's already surrounded by tick marks.)

milkmangames commented 9 years ago

I also have this problem on Neko, using ufront-orm checked out from github today (10/31/14 PST.)

jasononeil commented 9 years ago

Thanks @milkmangames, turns out the table name variable I was using was already quoted. The Linux mysql drivers seemed to handle it okay, but from what you said it choked on Windows. If you could check that the unit tests pass on Windows now that would be awesome.