Stress is a horrible thing. Can you share your classes with us? Sounds like
you haven't got anything marked up as [ActiveRecord(Lazy = true)]

http://www.castleproject.org/activerecord/documentation/trunk/manual/attributedocs/Generated_ActiveRecordAttribute.html

L

2009/6/8 vekaz turkovic <vek...@gmail.com>

>
> Hi all,
>
> I hate to whine (again), but I ran into problem I need to solve
> urgently, and I have no idea what is causing it.
>
> I don't know how I could mess up entities so badly to make Find(key)
> retrieve entire database, but I did.
>
> I am developing software for a clinic, so entities are Patient, Doctor,
> Service etc. and calling Patient.Find(key) returns them all.
> All records from all tables.
>
> I tried removing all the relations from Patient, except for one -
> Document, and still the same queries get generated.
> Document table has only one relation - that with Patient:
>         [BelongsTo("PacijentID")]
>        public virtual Pacijent Pacijent
>        {...}
>
> Patient side:
>        [HasMany(typeof(Dokument), ColumnKey = "PacijentID", Table =
> "Dokument")]
>        public IList<Dokument> Dokuments
>        {...}
>
> So if Patient entity has *any* relations specified, it returns
> everything from the database, although the entity in that relationship
> (Document)
> is not related to any other but Patient. Query runs 'normally' only if
> all relations are removed from Patient.
>
> I haven't slept all night and can't explain this any better atm. If
> anyone is willing to help me with this, please contact me asap.
>
> Thanks in advance.
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to castle-project-users@googlegroups.com
To unsubscribe from this group, send email to 
castle-project-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to