TL;DR -- I would like to be able to create models that were associated with 
views.  Is there a way to do this?

Let's say I have the following kinds of Sequel::Model (and attendant 
tables) with the attributes and associations listed:

   - Person -- name:String, current_address:Address
   - DriverLicense -- issue_date:Date, expiration_date:Date, 
   address:Address, person:Person, number:int
   - Address -- number:String, street:String, city:City
   - State -- name:String
   - City -- name:String, state:State

Let's then say that I want a view that shows me just those people that live 
in a certain city who have a currently valid driver license where the 
address listed on the license is different than their current address.  The 
view should provide the person's name, license number, the address listed 
on their license, and their current address.  I know how to create a view 
but all I know how to get back from it is a hash.  I want to be able to get 
a pile of PersonWithIncorrectAddressOnValidDriverLicense objects (of course 
I would have declared this class already).  I would also like to be able to 
change the name or any part of the current address of a 
PersonWithIncorrectAddressOnValidDriverLicense and have it update the 
database correctly.  Is there any existing way to do any of this and, if 
so, how?



-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to