Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-15 Thread Derek Chen-Becker
The code in the spec is: person.companies ++= companies person.save // Break some joins companies(3).delete_! // delete 4 companies(6).delete_! // delete 7 person.companies.refresh // reload joins so joinEntity.company.obj isn't cached person My plan is to make FKs

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-14 Thread Naftoli Gugenheim
Ah, I see. Where does MappedManyToMany delete anything not in the join table? If you mean the spec feel free to change it or comment out the whole thing and ask me to fix it. By the way it's hardcoded to use H2MemoryProvider. Is OneToMany doing anything bad? Thanks.

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-13 Thread Naftoli Gugenheim
Are FKs not created using a Driver that supports it? schemify calls ensureConstraints which seems to do it, no? - Derek Chen-Beckerdchenbec...@gmail.com wrote: If FKs are enabled then the spec fails because you're intentionally trying to break the joins by

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-13 Thread Derek Chen-Becker
Currently ensureConstraints calls DriverType.supportsForeignKeys_?, defaulting to false. The ticket that I'm working on is because none of the drivers seem to override that. The current MappedManyToMany throws an FK violation exception because it tries to delete one side of the Many-To-Many

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-10 Thread Derek Chen-Becker
If FKs are enabled then the spec fails because you're intentionally trying to break the joins by deleting the Companys that are on the other side of the many-to-many. I'm not sure that FKs should be enabled by default, but if I add the option to introduce them with schemify then I could write

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-08 Thread Derek Chen-Becker
OK, I've run into a snag. Schemifier does support foreign key creation, as do most of the database vendors. The ManyToMany Mapper support, however, seems to expect no foreign key constraints, since it's explicitly testing broken refs in the ManyToManySpecs tests: ManyToMany should { skip

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-08 Thread Julian Backes
OK, I've run into a snag. Schemifier does support foreign key creation, as do most of the database vendors. The ManyToMany Mapper support, however, seems to expect no foreign key constraints, since it's explicitly testing broken refs in the ManyToManySpecs tests: I do not really know

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-06 Thread Derek Chen-Becker
Absolutely. I have a PG 8.0, 8.1 and 8.3 instance set up for testing on my home box because of the last time I made a PG-related change. Derek On Thu, Dec 3, 2009 at 2:48 PM, David Pollak feeder.of.the.be...@gmail.comwrote: On Thu, Dec 3, 2009 at 1:47 PM, Derek Chen-Becker

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-05 Thread Julian Backes
I agree on both points (foreign keys and documentation). Please open a ticket asking for proper foreign key support and I'll work on it next week. http://github.com/dpp/liftweb/issues/#issue/224 Julian -- You received this message because you are subscribed to the Google Groups Lift

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-03 Thread Derek Chen-Becker
I agree on both points (foreign keys and documentation). Please open a ticket asking for proper foreign key support and I'll work on it next week. Derek On Wed, Dec 2, 2009 at 6:05 PM, Julian Backes julianbac...@googlemail.comwrote: Hi Derek, It's been a long time since I looked at that

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-03 Thread David Pollak
On Thu, Dec 3, 2009 at 1:47 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: I agree on both points (foreign keys and documentation). Please open a ticket asking for proper foreign key support and I'll work on it next week. Please make sure it works on PG 8.0/8.1 as there is at least 1 Lift

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-02 Thread Derek Chen-Becker
It's been a long time since I looked at that particular code, so I may have misspoke. Having said that, if it's currently disabled in the driver I'm not sure why and I would want to review it before saying that it works properly in all cases. Derek On Sun, Nov 29, 2009 at 1:11 PM, Julian Backes

Re: [Lift] Foreign Key constraints are not created by schemify

2009-12-02 Thread Julian Backes
Hi Derek, It's been a long time since I looked at that particular code, so I may have misspoke. Having said that, if it's currently disabled in the driver I'm not sure why and I would want to review it before saying that it works properly in all cases. I think the problem here is that the

Re: [Lift] Foreign Key constraints are not created by schemify

2009-11-29 Thread Julian Backes
Hi Lift Community, this is a reply to my own question: I'm trying to get my first scala/lift app working and I have a problem: Schemifier.schemify(...) creates everything, i.e. tables, primary keys, indices but it does not create the foreign key constraints. After hours of compiling and

[Lift] Foreign Key constraints are not created by schemify

2009-11-28 Thread Julian Backes
Hi, I'm trying to get my first scala/lift app working and I have a problem: Schemifier.schemify(...) creates everything, i.e. tables, primary keys, indices but it does not create the foreign key constraints. I've seen in Schemifier.scala SQL code for generating foreign key constraints so I