How to create a child domain in server 2008 without providing its Root name as suffix - windows-server-2008

I want to create a child domain in server 2008. For creating the child domain the naming convention is to give its Root name as a suffix. If your Root domain name is domainA.com then you have to give the child name as domainB.domainA.com.
What I want is to create a child domain domainB.com and not by its convention domainB.domainA.com.
Thanks,
Asif

Please see this.
Let me know if it is of any use.
http://www.trainsignal.com/blog/server-2008-active-directory-adding-a-child-domain
Regards
Ashutosh

Related

Apache:Do i need to add a record to my zone file for subdomains?

I need to make a subdomain for my main domain. Now when doing so do I need to add a record to my zone file for this? And if so what type of record, an A record? cname, or what?
A name in DNS does not get any content by itself, so if you want a new name to have an IP address associated with it, you have to put it there. If the point is to have a web server at the new name, you pretty much have to put an IP address there.
A name in DNS can have a variety of record types associated with it. A records hold IPv4 addresses. AAAA records hold IPv6 addresses. CNAME records tell whoever is looking "Don't look here, go look for whatever you were looking for over at that other name instead". So if they came looking for an A and found a CNAME, they'll go look for an A somewhere else and return whatever they found over there.
So, if you want there to be an IPv4 address for your new name, put in an A record for it. If you want to say "This new name should be absolutely identical to that other name in every respect", put in a CNAME record for it.
If you aren't sure exactly what CNAME records mean, please don't use them.

how create a rule for user can only see their own customers in openerp

I need to create a rule to a user can only see their own customers (SALES / CUSTOMERS in OpenERP menu), similar at rules "personal phone calls" or "personal initiative" in the "Sales / User: Own Leads Only".
I have resolved (partially) the problem with a duplicated group from SALES / USER: OWN LEADS ONLY group, and I have added a new rule based on "res_partner: access (read) on my partner" with the same DOMAIN and I have modified this rule to grant access to read, write, create and delete and now a user only can see his partners but now, when I try create a new partner, like a contact or company, I cant, because the system tell me access denied (document type: partner and action create). I dont know why can't create a new partner.
My version OpenERP is 7.0
Can anyone help me?
Thanks!
Mc
You need to use this domain in your new record rule:
['|',('user_id','=',False),('user_id','=',user.id)]
After setting this domain in your record rule, save it and again check your scenario.
By applying this domain, You will see your own customers as well as the customers, in which, there is no Salesperson defined. If possible, define salesperson for every customer so it will give you the exact result that you want.

Rails associations and create

I have a few models set up as Company and Employee. A company has many employees and a company should obviously be able to manage their employees.
What is the best approach to controller routing here? When a company want's to add a new employee should I route to the companies controller or to the employees controller?
For e.g. I could route to companies/:id/edit and then use a form with nested attributes to add employees. I could also just route to employees/new, or I could even use a nested resource and route to companies/:id/employees/new.
What do you think?
By the way I'm using STI, so Company < User and Employee < User
That's a good question. Here is what I think of the three options:
Routing to companies/:id/edit is unacceptable. Although you do edit a company by adding employees it is not meant for this purpose. This route should be used in order to edit company fields like company name, location etc.
Routing to employees/new is a good option, but not the one I would go on.
This is the best option in my opinion. In your case nested resources are created only in the context of their parent resource, so every aspect of you application should follow this. This includes the url for creating these nested resources, and the creation method itself which should be done through #company.employees.create!(params[:employee]) and not by Employee.create...
I think maybe it's not the best, but it's convenient, easy understand, and follow the rails way. You should use nested routes:
resources :companies do
resources :employees
end
Now you will have some routes like this:
company_employees GET /companies/:company_id/employees(.:format) employees#index
POST /companies/:company_id/employees(.:format) employees#create
new_company_employee GET /companies/:company_id/employees/new(.:format) employees#new
So, When you create a new employee, you know which company that employee belongs to thanks to :company_id. All codes for create new employee, update, destroy... of course, will be put in EmployeesController. Then you need to build a nested form for create new employees belong to one company.
If you want create, edit, update... company? Just create new resources for it:
resources :company
So, you can edit company, as in your question writen, through path: companies/:id/edit.

Update an entity inside an aggregate

I was reading a similar question on SO: How update an entity inside Aggregate, but I'm still not sure how a user interface should interact with entities inside an aggregate.
Let's say I have a User, with a bunch of Addresses. User is the aggregate root, while Address only exists within the aggregate.
On a web inteface, a user can edit his addresses. Basically, what happens is:
The user sees a list of addresses on its web interface
He clicks on an address, and gets redirected to this page: edit-address?user=1&address=2
On this page, he gets a form where he can modify this address.
I we decided to bypass the aggregate root, this would be straightforward:
We would directly load the Address with its Id
We would update it, then save it
Because we want to do it the DDD way, we have different solutions:
Either we ask the User to get this Address by Id:
address = user.getAddress(id);
address.setPostCode("12345");
address.setCity("New York");
em.persist(user);
The problem with this approach is, IMO, that the aggregate root still doesn't have much more control over what's done with the address. It just returns a reference to it, so that's not much different from bypassing the aggregate.
Or we tell the aggregate to update an existing address:
user.updateAddress(id, "12345", "New York");
em.persist(user);
Now the aggregate has control over what's done with this address, and can take any necessary action that goes with updating an address.
Or we treat the Address as a value object, and we don't update our Address, but rather delete it and recreate it:
user.removeAddress(id);
address = new Address();
address.setPostCode("12345");
address.setCity("New York");
user.addAddress(address);
em.persist(user);
This last solution looks elegant, but means that an Address cannot be an Entity. Then, what if it needs to be treated as an entity, for example because another business object within the aggregate has a reference to it?
I'm pretty sure I'm missing something here to correctly understand the aggregate concept and how it's used in real life examples, so please don't hesitate to give your comments!
No, you're not missing anything - in most cases the best option would be number 2 (although I'd call that method changeAddress instead of updateAdress - update seems so not-DDD) and that's regardless whether an address is an Entity or Value Object. With Ubiquitous Language you'd rather say that User changed his address, so that's exactly how you should model it - it's the changeAddress method that gets to decide whether update properties (if Address is an Entity) or assign completely new object (when it's VO).
The following sample code assumes the most common scenario - Address as VO:
public void ChangeAddress(AddressParams addressParams)
{
// here we might include some validation
address = new Address(addressParams);
// here we might include additional actions related with changing address
// for example marking user as required to confirm address before
// next billing
}
What is important in this sample, is that once Address is created, it is considered valid - there can be no invalid Address object in your aggregate. Bare in mind however, that whether you should follow this sample or not depends on your actual domain - there's no one path to follow. This one is the most common one though.
And yes, you should always perform operations on your entities by traversing through aggregate root - the reason for this was given in many answers on SO (for example in this Basic Aggregate Question).
Whether something is an entity or VO depends on the requirements and your domain. Most of the time address is just a Value Object, because there's no difference between two addresses with the same values and addresses tend to not change during their lifetime. But again, that's most of the time and depends on domain you're modeling.
Another example - for most of the domains a Money would be a Value Object - 10$ is 10$, it has no identity besides amount. However if you'd model a domain that deals with money on a level of bills, each bill would have its own identity (expressed with a unique number of some sort) thus it would be an Entity.

Where to find product name in Prestashop Database structure

i'm developing a very simple (for newbie user) back end for prestashop, and i would like to know where to find the product’s images name uploaded..
I know they are into “img/p” directory. But i don’t know:
1. In which database table they are .. linked
2. Why they are called (for example): 1-18-small.jpg … why “1-18” instead “1” (his productid) ? what that number means ?
Thanks
Since image names are language dependents, you will find them in image_lang table.
About filenames, the pattern is : productId-imageId-size.jpg
Full table structure you can see here:
http://doc.prestashop.com/display/PS15/Fundamentals
Names of the files:
In my case viwth ver. 1.5 is: img/p/3/0/3/1/3031-home_default_1.jpg
So its very easy to understand name is repeating folder structure.
img/ - image
p/ - product
3/0/3/1/ i think is so many because in case you have may images for one product.
3031 folder structure and then home_default_1.jpg or another sizes with different names in same folder, you can see just browse this folder.