CI 2 & Datamapper - Two foreign keys to same field - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: CI 2 & Datamapper - Two foreign keys to same field (/showthread.php?tid=63544) |
CI 2 & Datamapper - Two foreign keys to same field - ocuse - 11-11-2015 I have a database with a table as follows: Code: CREATE TABLE `flight_booking` ( So, a booking has 2 airports, an arrival and a departure one Thing is, I can't figure out how to declare the relationship in my model. I've tried different things, this is what I have right now: Code: class flight_booking extends DataMapper { This gives me an "Unable to access an error message corresponding to your rule name: required." error when trying to save Any ideas? |