Why don't u use many-to-one to user on Event class ?

class Event{
 public int Id {get;set;}
 pubic string Title {get;set;}
 public User User {get;set;}
}

---
Vision without action is a waking dream.
Action without vision is a nightmare.


On Sat, Oct 3, 2009 at 2:21 PM, Tim Kolesnik <[email protected]>wrote:

>
> Hello, I have such problem. There are 2 tables: User and Event.
> User
> ----------------
> Id
> Username
> TimeZone
>
> Event
> ----------------
> Id
> Title
> UserId
>
> Event has FK to User table (UserId column). Here are corresponding
> domain classes:
> class User{
>  public int Id {get;set;}
>  public string TimeZone {get;set;}
> }
>
> class Event{
>  public int Id {get;set;}
>  pubic string Title {get;set;}
>  public string UserTimeZone {get;set;}
> }
>
> As you can see Event.UserTimeZone property doesn't have column in db.
> I'd like to retrieve it's value dynamically. Is it possible to
> implement such via Criterion API  in single db call (e.g. retrieve all
> events, with filled UserTimeZone prop) ? Thanks.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to