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 
To post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to