Hi all.

I have the Following problem:

I got an entity (let's call it "worker" for the example) which belongs
to another app. From here I want to retrieve some info, and since I
don't want to be always syncronizing, i would like to be fetching info
from here.

I can access it with the following line and all the necessaries
mappings:

    [ActiveRecord("Worker",  Schema = "HumanResources.dbo",
SchemaAction = "none", Mutable = false)]
    public partial class Worker: ActiveRecordBase
    {
        [PrimaryKey(PrimaryKeyType.Native, "COD", ColumnType =
"Int32")]
        public int Id { get; set; }

        [Property("NOME", ColumnType = "String", NotNull = true)]
        public virtual string Name { get; set; }

        [Property("SEXO", ColumnType = "String", NotNull = true)]
        public virtual string Sex { get; set; }

        internal static IEnumerable<Epmes> FindAll()
        {
            IEnumerable<Epmes> aux = null;

            try
            {
                aux = (IEnumerable<Epmes>) ActiveRecordBase.FindAll
(typeof (Epmes));
            }
            catch(Exception _ex)
            {
                MessageBox.Show(_ex.Message, "Worker Fetch Warning");
            }
            return aux;
        }
    }

My developing app is in another schema, so I specify it.

Now I want to be able to make it inherit from a class (call it it
SuperEntity), from which another class (Guest) inherits too.

I would have the following diagram:

                                                SuperEntity
                                                  ^         ^
                                                  |          |
                                              Worker  Guest

How can I do my mapping? I have been trying several approaches, but
the one I think should be the most correct would be "table per
concrete subclass"... but i am not skilled yet to do it.

Tk
--~--~---------~--~----~------------~-------~--~----~
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