Welcome Guest, Not a member yet? Register   Sign In
CI + DataMapper + sort relationships
#5

[eluser]chrisloki[/eluser]
That's exactly what I need.

How I said, if I could manipulate de intermediate table (A_B) like Hibernate does (adding another field, in this case element_position), then it would be lot easier.
I would have and table like:


A_id | B_id | element_position
1 | 1 | 0
1 | 2 | 2
1 | 3 | 1
2 | 1 | 2
2 | 2 | 1
2 | 3 | 0

and this table will guarantee integrity of the data.

Doin' what you've said, is possible, but I think it's not the best way: I would have to first get this text field with the desired order (splitting the values) and iterate, and for each value do a select query to get each B in the desired order.

I'll take a look later if I can manage this - I work half part with java+velocity, half parte with PHP.

Thanks again, and sorry for any bad english (this is not my home language)!


Messages In This Thread
CI + DataMapper + sort relationships - by El Forum - 11-05-2009, 08:13 AM
CI + DataMapper + sort relationships - by El Forum - 11-05-2009, 08:53 AM
CI + DataMapper + sort relationships - by El Forum - 11-05-2009, 10:09 AM
CI + DataMapper + sort relationships - by El Forum - 11-05-2009, 10:20 AM
CI + DataMapper + sort relationships - by El Forum - 11-05-2009, 10:31 AM
CI + DataMapper + sort relationships - by El Forum - 11-05-2009, 11:12 AM
CI + DataMapper + sort relationships - by El Forum - 11-05-2009, 04:42 PM
CI + DataMapper + sort relationships - by El Forum - 11-09-2009, 06:32 PM
CI + DataMapper + sort relationships - by El Forum - 11-09-2009, 07:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB