[ Create account | Log-in ] Home ::  Downloads ::  Web links ::  FAQ 
Main Menu

Online
There are 4 unregistered users and 0 registered users on-line.

You can log-in or register for a user account here.



Searching with subselects
Posted Jul 05, 2005 - 01:26 AM


C# Persistent Framework News Nick has been working on some subselects and Im glad to report that progress has been great! Something like this will work:
SearchCriteriaList vCrits = new SearchCriteriaList();
vCrits.Add( true, "Name", "Nick", "", SearchCriteriaOperator.Like, false)
vCrits.Add( true, "Orders.OrderDate", Date.Parse("2005-01-01"), null, SearchCriteriaOperator.GreaterThan, false);
CustomerList vCusts = new CustomerList();
vCusts.LoadByCriteria( vCrits )
Should return all the orders of the "Nick" customer made since the new year of 2005. Note that the only thing the developer has to do is to define the relationship once between the Customer and the Orders as such:
public class Customer: PDObject
{
   ...
  [OneToMany("ID", "CustomerFK")]
  public OrderList Orders {
     get { return (OrderList) PDList.CreateByAttribute( this, "Orders" ) }
   ...
}
The framework will make use of all this information to generate the appropriate subselect statement in SQL.

Fun stuff!

yk.


 
Login
 



 


 Log in Problems?
 New User? Sign Up!

Related links
· More about C# Persistent Framework News
· News by yoonkit


Most-read story in C# Persistent Framework News:
All about Enums

Searching with subselects | Log-in or register a new user account | 0 Comments
Comments are statements made by the person that posted them.
They do not necessarily represent the opinions of the site editor.

Other Stories
· Downtime ... mysql (Nov 16, 2005)
· Editable Grids, and OnPopulateCell.. Change of param signature (Sep 11, 2005)
· Right hand Column (Sep 02, 2005)
· site down.... (Aug 18, 2005)
· More Apps with csopf (Aug 09, 2005)
· Namespace change for ASP (Aug 09, 2005)
· Searching with subselects (Jul 05, 2005)
· Strange Links. (Jun 16, 2005)
· csopf is listed in the UNDP - International Open Source Network (Jun 14, 2005)
· All about Enums (Jun 10, 2005)

Poll
How do you persist your objects?

· With an Object Persistent Framework
· Manually write out SQL statements
· Object to RDBMS Mapper
· CRUD is Code Gen'ed
· Dont need to - OODB!
· Real men dont store data!

[ Results | Polls ]

Votes: 119
Comments: 0


Login
 



 


 Log in Problems?
 New User? Sign Up!

Past Articles
Friday, June 10
·Namespace change for UIs. (0)
Tuesday, June 07
·csopf-v0.4.0 is finally out! (0)
Monday, June 06
·csopf works with mono (0)
Sunday, June 05
·Revamp to the csopf Website (0)
Sunday, December 05
·Wot?! No Updates?! (219)
Monday, October 18
·Transactions as Well! (124)
Monday, October 11
·ASP.NET.... working on it! (272)
Thursday, September 30
·.Net Reflection and Performance (127)
Wednesday, September 22
·csopf-v0.3.9 - Major Changes (82)
Thursday, September 16
·Work In Progress for v0.3.9 (256)
 Older articles
Home ::  Share your story :: 

Web site powered by PostNuke yoonkits blog Malaysian IndependantDot Net Developers


All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest (c) 2004 by me
This web site was made with PostNuke, a web portal system written in PHP. PostNuke is Free Software released under the GNU/GPL license.
You can syndicate our news using the file backend.php