473,385 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ActiveRecord and .net

Hi All, I hope you get to read this question. I am very new to ActiveRecord and I had this basic question.

I have a table called NetProfile where I have a column called UserGUID. This column is not a PKey and its just another colujmn in the table. I have another table called NetSearchOption that has an ID which is an int identity column plus a column called UserGUID. The relationship between these 2 tables is 1-1.

Basically, In a struggling to retrieve a Netprofile record along with NetSearchOption details for that UserGUID but the join should happen based on the profileid and not on the PKs, as UserGUID is not the PK.

So, my NetProfile class along with the ProfileGuid column also has a property called netSearchOption:

public virtual NetSearchOption NetSearchOption { get; set; }

and my NetSearchOption class has the property

public virtual Guid ProfileGuid { get; set; }

So, what kind of attributes should I need to add on both these properties so that I can basically say, give me the Netprofile record but do something like select * from NetSearchOption where profileguid=Netprofile.profileguid

Quick reply would be greatly appreciated! Thanks in advance..
--Lakshmi
Jun 8 '12 #1
0 1875

Sign in to post your reply or Sign up for a free account.

Similar topics

52
by: Tony Marston | last post by:
Several months ago I started a thread with the title "What is/is not considered to be good OO programming" which started a long and interesting discussion. I have condensed the arguments into a...
0
by: jbeduya | last post by:
http://community.devpinoy.org/blogs/jbeduya/archive/2006/01/30/1182.aspx Thanks, Junrey Beduya http://sourceforge.net/projects/phptarsier
1
by: Junrey Beduya | last post by:
Release Name: phptarsier 0.1.1pre-alpha Notes: This release was delayed in schedule due to some projects that I have to do first. Sorry for those who have anticipated this early. This has...
0
by: Carl Vondrick | last post by:
Hi everyone, I am having trouble wrapping my mind around the ActiveRecord pattern and foreign keys. I understand that for each table, there should be a class, and each row is is effectively an...
3
by: Devraj | last post by:
Hi everyone, My application uses MySQL as a backend and am using the MySQL/Python bindings. Are there any libraries that provide a database abstraction layer like Activerecords for Python?' ...
6
by: Andrus | last post by:
VCSE 2005 .NET 2 WinForms I created assembly at runtime and added mydll.dll reference to it. mydll.dll is in applicatino startup directory. When I change mydl.dll to never version, this assembly...
3
by: paulus4605 | last post by:
dears since I'm new to ruby I try to create a form within ruby on rails. this is my controller require "player" class SpelersController < ApplicationController def index @speler =...
1
by: Berryl Hesh | last post by:
I don't know where the "%" sysmbols are coming from, but without them this is a valid directory. I've pasted both the exception and code that triggeered it below. The purpose of this code block is...
3
by: Mitchell Gould | last post by:
I just update my RubyGems and Rails. I am working on Rails 2.3.2 and everything was working prior to this update. Now I am getting the following error: undefined method `inject' for...
2
by: littlemaster | last post by:
I want to use two schema in single rails application, for that how to specify the schema name in model. Tried with following, it was not working. set_table_name "schemaname.tablename" schema...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.