Hi,
I’m trying to get the previous and next item (articles) from a database 
with Datamapper. I thought of doing it with the serial identifier 

property :id,         Serial


and increment/decrease this number to find the previous/next posts of that 
particular article, but it doesn’t work. Because the serial is incremented 
fine for new articles (1,2,3,4,5), but if you delete say id: #3, then the 
next article of #2 will be #4, not #3.

Do you know if there is an easier/more correct way to do it with Datamapper?

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/datamapper/-/DcHhm81m4OwJ.
To post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to