Mapping to Existing DB

Periop IT's Avatar

Periop IT

09 Sep, 2010 06:00 PM via web

Is it possible to create an entity based on an existing database table without implementing all of the table's structure? If so does anyone have any examples?

  1. Support Staff 2 Posted by James Gregory on 10 Sep, 2010 08:19 AM

    James Gregory's Avatar

    Yes, just don't create properties for the columns you don't want.

    On Thu, Sep 9, 2010 at 7:03 PM, Periop IT <
    ***@tenderapp.com<tender%***@tenderapp.com>
    > wrote:

  2. 3 Posted by Periop IT on 10 Sep, 2010 02:14 PM

    Periop IT's Avatar

    Then can I map the existing key to the ID property? If so do you have any examples using automapping?

  3. Support Staff 4 Posted by James Gregory on 11 Sep, 2010 09:15 AM

    James Gregory's Avatar

    Could you be a little more specific as to what you're trying to do?

    On Fri, Sep 10, 2010 at 3:16 PM, Periop IT <
    ***@tenderapp.com<tender%***@tenderapp.com>
    > wrote:

  4. 5 Posted by Periop IT on 13 Sep, 2010 02:45 PM

    Periop IT's Avatar

    I have an existing database that I am going to be replicating certain tables over to an SQLite database. The primary keys need to match. I know I could have a two columns, one for the NHiberate ID and another for my source PK but I am trying to avoid that.

Reply to this discussion

Preview Comments are parsed with Markdown. Help with syntax

Attached Files

    You can attach files up to 10MB

    What is fifteen divided by three?